Peter McGlynn got the only goal of the game to get Trevor Croly's reign as new Bray Wanderers' boss off to the ideal start with a 1-0 victory over St Patrick's Athletic in the Airtricity League Premier Division.
McGlynn struck on 74 minutes when his cross shot took a deflection to end up in the St Pat's net.
The win was a much needed boost for Bray following four heavy defeats and is only their third clean sheet of the season.
The unexpected defeat ended St Pat's nine-match unbeaten run, while asking questions of their title aspirations.
Brendan Clarke made his return in goal for St Pat's after a two-month absence, while Conor McCormack started at right-back in Liam Buckley's two changes from last Monday's 0-0 home draw with Shamrock Rovers.
Croly made just one change for his first match in charge of Bray with Adam Mitchell coming into defence in place of Niall Cooney.
Though St Pat's dominated the early possession, Bray had a terrific chance to take the lead on four minutes.
Chris Lyons got in behind and took the ball around Clarke. But, inexplicably, he failed to shoot himself, instead laying the ball off for Adam Hanlon who drilled his shot wide as a gilt-edge opening was wasted.
It nonetheless gave Bray an injection of confidence and they began to knock the ball around purposefully with McGlynn getting off a shot on seven minutes that was comfortable for Clarke.
But it wasn't long before St Pat's threatened with Killian Brennan forcing Stephen McGuinness into a smart tip over save from a wind-assisted free kick on 11 minutes.
Bray continued to pass the ball well, though, and remained dangerous on the break, creating another very promising opening on 26 minutes.
The lively Lyons played a return pass to McGlynn's whose stinging drive was brilliantly tipped over by Clarke.
In an end-to-end contest, St Pat's were close to the lead eight minutes later.
Ciaran Kilduff got on the end of Conan Byrne's hooked cross only to see his downward header bounce wide.
The diminutive Lyons was proving a right handful for the St Pat's defence and he got in behind Sean Hoare on 43 minutes to whip over a dangerous low cross, though no team-mate was there to apply the vital touch.
At the other end, Bray defended doggedly with a posse of green shirts getting in the way to block a Byrne shot on the blow of the break.
St Pat's had a bit more urgency to their game into the second half. Kilduff had a sight of goal four minutes in but just couldn't get enough purchase on his shot from an Aaron Greene cross, making it an easy gather for McGuinness.
Bray somehow survived a right scrambled following a Byrne corner just past the hour mark with Hoare finally blazing over the bar.
Croly's side were under the cosh now and had another right let off on 72 minutes.
Substitute Morgan Langley's cross picked out Byrne in the area and he had two efforts bravely blocked by Adam Mitchell.
But Bray then snatched their winner against the run of play on two minutes later.
Little appeared on as McGlynn whipped in a cross-shot from the left, which appeared to take a deflection to fly past Clarke to the net.