Dublin City 2 Shelbourne 3
Shelbourne's title charge is in danger of turning into a stumble but having kept the momentum going last night, they will be confident that they have got enough left in the tank to claim the title in the coming weeks.
Last night's game was, on paper, a formality. Tenants Dublin City have lost all three league meetings with their landlords before last night and with Shelbourne high on confidence after last week's fight back against Bohemians, there seemed little danger that they would not pick up all three points.
That they did eventually win was more down to nerves and guts than skill as twice Dublin City fought back only for substitute Gerard Rowe to give Shelbourne the points at the very end.
The best of the action was squeezed into the final seven minutes with the game tied at 1-1.
At that point, a draw would have effectively handed the title initiative to Cork City who would then know that victories in their remaining games would bring the title Leeside.
Shelbourne certainly knew this and had abandoned all pretence of calmness in favour of anxiety as they pushed everybody forward, eventually gaining a reward when Jason Byrne grabbed his 24th goal of the season.
That looked to be that, but in injury time, Robbie Farrell equalised for Dublin City only for Rowe to produce his heroics straight from kick-off.
It was not a classic performance from Shelbourne, though, in the end, it was effective after they had taken an 15th minute lead through Jamie Harris when he headed home Alan Cawley's right wing cross.
But Dublin City were level in the 27th minute when Marc Kenny fired home from the penalty spot after Kevin Doherty had tripped Cathal O'Connor.
Byrne flashed a low cross in front goal which was narrowly missed by Hoolahan with Ryan magnificently saving Cawley's follow-up before Gary O'Neill had a shot blocked by Byrne at the other end.
Steve Williams was then called into action to block a Cathal O'Connor shot before O'Neill also tested the goalkeeper.
At that stage, the game looked certain to end in a draw but with seven minutes remaining, Byrne fired a low shot home from the edge of the area after beating the Dublin offside trap.
That looked to have settled the game in Shelbourne's favour but Dublin City fought back and equalised in the second minute of injury time when Farrell shot to the back of the net after a goalmouth scramble.
But, even then, it was still not over as Rowe lashed home the winner from the edge of the area after a quick attack straight from the kick-off.
DUBLIN CITY: Ryan; Henry, Cooper, T O'Connor, Rowland; C O'Connor, Crowley, Kenny, Tierney, Rundle; O'Neill. Subs: Farrell for Rowland (83 mins), Hynes for C O'Connor (89 mins)
SHELBOURNE: Williams; Heary, Doherty, Harris, Rogers; Cawley, Moore, Crawford, Hoolahan; Byrne, Fitzpatrick. Subs: Rowe for Fitzpatrick (66 mins), Morgan for Cawley (77 mins), Shields for Byrne (89 mins)
Referee: D Hanney (Dublin)