Two-goal hero Shaun McGowan ensured title-chasing Finn Harps left with all three points after a tempestuous eircom League of Ireland First Division encounter at Tolka Park.
The visitors recovered from falling behind to an early Alan Keely goal to snatch victory at the death and bring Shels’ run of three straight wins to an end.
It took the hosts just eight minutes to open the scoring. Keely made enough space for himself to meet Marc McCulloch’s in-swinging corner and the centre-back’s powerful header flew in off the underside of the Ballybough End crossbar.
Mark Rooney almost doubled Shelbourne’s lead two minutes later when Mark Leech’s defence-splitting pass put his strike partner in. However, Harps goalkeeper Gavin Cullen stood up well to win the one-on-one.
Harps’ first chance came after 15 minutes. Conor Gethins’s effort from outside the area moved in the air but James Hussey judged it well enough to get two hands on the ball.
Moments later the hosts were down the other end and only a brilliant last-ditch tackle from Shaun Holmes prevented Leech from converting from close range following a slick move involving Jim Crawford and Rooney.
Then came a period of Harps dominance as the Donegal outfit won three successive corners that troubled the Shels defence but ultimately came to nothing.
The visitors were unfortunate not to equalise, however, when Gethins latched on to a loose ball soon afterwards. The diminutive number ten’s low shot from got beyond the despairing dive of Hussey but bounced back off the upright.
Rooney wasted a glorious opportunity on the half hour. The Shelbourne striker did brilliantly to dispossess a ponderous Holmes, but approaching the box he opted to ignore the runs either side of him of James Chambers and Leech in favour of a skewed shot that went harmlessly wide.
The second half was seven minutes old when Harps levelled matters. Stephen Parkhouse and Gethins linked well to force a parried save out of Hussey but McGowan reacted quickest to prod home from close range.
The goal shook Shels, and Parkhouse nearly gave Harps the lead when he took advantage of hesitancy in the area to fire in a shot that was pushed out for a corner by Hussey.
Leech had two chances inside the last 12 minutes but first Cullen and then a crucial saving challenge from Jonathan Minnock denied the Shels striker.
Then, as the clock closed in on the end of normal time, McGowan timed his run into the box perfectly to connect with a beautifully flighted cross from the left wing by Holmes.
The midfielder planted his header into the near top corner before being mobbed by team-mates. The late winner means that Harps move to within a point of leaders Cobh Ramblers, though the Cork side now have a game in hand.
There were unruly scenes immediately after the final whistle as Shelbourne manager Dermot Keely made a beeline for Parkhouse. The pair, who had been involved in verbal exchanges throughout the match, were thankfully kept apart.
Shelbourne: Hussey, Murphy, Keely, Malcolm, McCulloch, Chambers, Crawford (capt), Collins (Haverty h-t), Lacey (Reilly, 67 mins), Leech, Rooney (Quinn, 74).
Finn Harps: Cullen, Asuakah, Boyle, Holmes, Minnock, Funston (O’Loughlin, 77 mins), Shields (capt), McGowan, Brolly (Breen*, 81), Parkhouse, Gethins.
* McLaughlin replaced Breen on 90
Referee: C Fitzgerald.