A first-half goal from Ger Pender and the brilliance of goalkeeper Peter Cherrie provided managerless Bray Wanderers with a big lift as they jumped two places off the foot of the Airtricity League Premier Division table to stun St Patrick's at the Carlisle Grounds.
St Pat's night ended farcically when goalkeeper Brendan Clarke was sent off in stoppage time for pulling down Andrew Lewis, with central defender Sean Hoare having to go in goal as they had used all three substitutes.
In a slow burner of a game on a perfect spring evening, St Patrick's had the first attack of note on 12 minutes. Billy Dennehy hooked a ball over the top on the left for overlapping skipper Ian Bermingham whose cross was easily gathered by Cherrie.
A minute later former Bray midfielder Graham Kelly had the first shot in anger when driving wide from distance.
Dylan Connolly had Bray's first sight of goal on 16 minutes, but a sublimely timed tackle from Hoare snuffed out the danger.
Cherrie was worked for the first time back at the other end four minutes later. Bray failed to properly clear and Bermingham set up David Cawley who brought a save form the Wanderers' keeper low to his right.
Cherrie then produced the first telling moment of the first half on 39 minutes to keep St Pat's out.
Conan Byrne intercepted Robbie Creepy's attempted pass with the ball sitting up for Christy Fagan whose 25-yard volley was brilliantly tipped over the top by the Bray keeper.
It proved all the more important as Bray stung their visitors to take the lead a minute before the interval.
Striker Pender was alert to pounce on a defensive mistake to race in and confidently slip the ball past Clarke to the net for a calm finish which would oproved the only goal of the game.
St Patrick's brought on Dinny Corcoran to replace Fagan early in the second half as they chased the game hard. But it was Bray who came very close to extending their lead on 58 minutes.
Andrew Lewis did well on the right to intercept an attempted clearance. His low cross saw Connolly just fail to connect dead in front of goal.
Cherrie then made his second top save of the night ten minutes later when diving low to his right to push out St Patrick's substitute Jamie McGrath's shot.
And the Bray keeper was there again on 78 minutes to tip another McGrath shot round a post.
A minute later Lewis blew a chance to add a second for Bray when skying over the top after a brilliant break by Connolly on the right.
St Patrick's were inches from an 88th-minute equaliser. McGrath's lob came down off the underside of the crossbar before being bravely headed away by Hugh Douglas.