Derry City moved to within three points of Premier Division leaders St Patrick's Athletic with this win over Bray Wanderers at the Carlisle Grounds.
Patrick McEleney fired in from 16 yards in the 14th minute but Ismahil Akinade levelled 10 minutes before the break.
Rory Patterson's glancing header in added time at the end of the first half made it 2-1 and the striker sidefooted home his second in the 51st minute.
Dean Zambra got the final touch to pull one back for Bray five minutes later.
The match was played in difficult wet and windy conditions and the Candystripes grabbed an early lead when McEleney latched onto a Patterson flick-on to power in a low shot from 16 yards out.
Ger Doherty tipped a David Webster effort over the bar but Akinade found the net after the visitors failed to clear a Kieran Waters corner.
Patterson nudged his side ahead after meeting Barry McNamee's floated ball into the box.
Paddy Kavanagh provided the low cross for Patterson to score his second of the game and 19th of the season.
Zambra appeared to bundle the ball in from six yards out after Doherty failed to get a clear punch on a Bray corner and Jason Byrne then missed a godo chance to equalise.
Derry have a match in hand over league leaders St Pat's, who lost 2-1 to Dundalk on Friday night.
"It was a professional performance from the boys in very difficult conditions - to score three goals away from home and pick up three points is very satisfying," said Derry manager Declan Devine.
The League of Ireland now takes a mid-season break, with Devine hoping to bring in some new faces ahead of a busy schedule of games next month.