Teenager Glen McAuley was the toast of Inchicore as he was sprung from the bench to score his first goal for St Patrick's Athletic who had to come from behind to put First Division Bray Wanderers out of the Extra.ie FAI Cup at Richmond Park.
Promotion play-off hopefuls Bray started brightly with Dylan McGlade and Hugh Douglas having half chances that never troubled Brendan Clarke in the Saints' goal.
At the other end, Gabriel Sava saw action for the first time 10 minutes in, comfortably gathering Jamie Lennon's drive from distance.
That prompted a good spell of St Pat's possession even if they laboured to create much in front of goal until the 21st minute.
Bray initially failed to properly clear a Lennon corner. Darragh Markey was quickly onto the loose ball, cleverly skip past Brandon McCann into the area to crack a right-foot shot off the crossbar.
Four minutes later, Markey was the instigator when adroitly making space to slide Simon Madden in on goal to shoot across Sava and hit the butt of the far post as Bray survived again.
Despite that, St Pat's had a right let off on the half hour when McCann flicked inches wide of a post from a McGlade cross after good approach play by John Martin.
Bray then stole the lead five minutes before the break.
The industrious Martin won a free kick that Derek Daly's left foot sublimely crashed against the St Pat's crossbar, the ball flying up into the air.
Dean Williams was first to the dropping ball to bundle it over the line to stun the small home attendance.
St Pat's laid siege to the Bray goal from the restart, Conor Clifford curling narrowly wide before their pressure told for the equaliser on 55 minutes.
Centre-half Dave Webster burst forward, getting the return pass from Dean Clarke and then drilling a low shot to the net to score against his former club.
But St Pat's were caught square at the back as Bray were close to regaining the lead on the hour.
Martin threaded McGlade in on goal. The winger went around Clarke before seeing his shot cleared off the line by Lennon.
Sava batted away a drive from Lee Desmond before St Pat's lived dangerously again on 66 minutes.
This time McGlade cut in from the left to set up substitute Joe Doyle whose shot was parried by Clarke. Williams fired the rebound wide.
St Pat's soon regained control to get their winner on 75 minutes.
And it was all McAuley's own work as the 19-year-old cut in from the left to drive a low shot to the corner of the net despite Sava getting a touch to it.