A stoppage-time Tim Clancy goal earned Bray Wanderers a somewhat fortunate 3-2 win against Derry City at Maginn Park.
The visitors raced into a 2-0 lead before half-time thanks to Gary McCabe and Aaron Greene's strike before a tremendous second half comeback by Kenny Shiels' side, which saw Aaron McEneff and Dean Jarvis both finding the back of the net.
It was an emotional evening at Maginn Park before the kick-off as there was a number of poignant tributes to Derry's late captain Ryan McBride.
Prior to the minute's applause, the next generation of City players in the Under-17 and Under-19 squads were on the pitch in a shape of five in memory of their late captain, while the young City Cubs supporters released red and white balloons.
Both teams warmed up in McBride 5 t-shirts and it was the home side who should have got off to the perfect start after just 40 seconds, but Rory Patterson, who returned from injury, failed to trouble Wanderers keeper Peter Cherrie when in a glorious position inside the six yard box.
Wanderers had a half-chance themselves on six minutes but Aaron Greene dragged his shot wide after Dylan Connolly's clever flick had created the chance.
The woodwork came to Wanderers' rescue on 16 minutes as goalkeeper Peter Cherrie made a fantastic fingertip save to keep out Patterson's close-range header.
Wanderers took the lead on 27 minutes as Gary McCabe's clever free-kick caught out City keeper Gerard Doherty and stunned the large home support.
Derry went close to equalising virtually straight away, but Cherrie kept out Lukas Schubert's strike from just inside the box.
Despite the set-back, the home side continued to push forward and they went close again but Ronan Curtis headed over from 10 yards after Aaron McEneff's corner had picked him out.
On 43 minutes, Wanderers doubled their lead in a fantastic counter-attack as Conor Kenna's long punt down field released Aaron Greene and the ex-Sligo Rovers man made no mistake drilling the ball low past Doherty.
Doherty, who injury his thigh when colliding into the post in his attempt to try and keep McCabe's free-kick out, had to replaced at half-time with Eric Grimes taking over in goals.
The former Cork netminder was called into action on 47 minutes, diving low to his right to keep out McCabe's 20 yard free-kick.
Moments later, Cherrie made another outstanding save, this time from point-blank range he somehow kept out Nathan Boyle's powerful strike.
Just after the hour mark, Derry finally got on the scoresheet from the penalty spot after McEneff was brought down inside the six-yard box following a goalmouth scramble and the midfielder picked himself up and blasted home the resulting effort from 12 yards.
Derry levelled things with five minutes remaining as a sublime pass by Nicky Low released left-back Dean Jarvis, who ghosted in behind Wanderers backline before coolly lifting the ball over Cherrie.
Then, deep into stoppage time, Wanderers scored what was the winner as Clancy came up from the back to glance home Greene's teasing delivery.
Derry City: Doherty (Grimes HT), McDermott, Jarvis, Barry; Schubert, McEneff, Low, McNamee, Curtis; Patterson (Daniels 32), Boyle
Bray Wanderers: Cherrie, Douglas, Kenna, Clancy, Earley (Kehoe 38); Sullivan, Salmon, Buckley (Marks 73); McCabe (Noone 80), Connolly; Greene
Referee: Mr Derek Tomney (Dublin)