On such bizarre incidents are championships won. And so Shelbourne go two points clear at the top of the Premier Division thanks to a freak UCD own goal seven minutes from the end of a match at Belfield that will be remembered as the game of the season by all in the 2,500 crowd.
With two games remaining, the title can only now be lost by Damien Richardson's side while UCD, who gallantly twice came from behind, must face a nerve-jangling last two matches they surely must win well to avoid having to play off against Limerick.
With rain making conditions very difficult for both teams, they nonetheless produced a scintillating 90 minutes of football that belied all that was at stake for them both.
UCD, who had Terry Palmer back in the heart of their defence, passed the ball from the start and took the game to Shelbourne in the opening exchanges.
That almost brought the reward of a goal in the ninth minute when their skipper Aidan Lynch scraped the top of the crossbar after Jason Sherlock had released Damien Bolger down the right to cross.
The conditions, if anything, lent themselves perfectly to helping the helter-skelter pace of the game and with errors expected, the chances came quick and fast at either end.
UCD had a let-off within two minutes of Lynch's chance when Tony McDonnell made a courageous, saving tackle on Mark Rutherford. But it was a momentary reprieve as Shelbourne were in front three minutes later with a goal their manager Richardson will tell you epitomises his team.
Pat Fenlon started and finished the move. He initially sent Dessie Baker away down the right after dispossessing Declan Fitzgerald and then arrived at the back post to side-foot the ball home with his right foot after Stephen Geoghegan dummied Baker's cross.
UCD responded splendidly and were level within four minutes. Former student Tony McCarthy gave away a free-kick which Eamonn McLoughlin whipped into the area for Robert Griffin to power home a header.
McCarthy redeemed his indiscretion within two minutes to head Shelbourne back in front when left unmarked from a Baker cross.
But, after Geoghegan had wasted a glorious opportunity to give Shelbourne a 3-1 cushion when failing to punish a mistake by McDonnell on 34 minutes, UCD equalised again five minutes before half-time.
A fortuitous rebound off Rutherford inside the Shelbourne area gave the ball to Mick O'Byrne who pulled it back for Lynch to arrive and skilfully beat Gough with the instep of his left foot from 12 yards.
The second half was equally as hectic but not surprisingly lacked the goal-mouth incidents of the first.
It was not until the 70th minute that a clear opening came when Geoghegan somehow contrived to toe-poke wide after being played clean through by Kelly.
But Shelbourne had grown to dominate this period and perhaps got their just reward in the 83rd minute, but in the cruellest way possible for UCD.
A sustained Shelbourne attack brought panic to the UCD defence and their goalkeeper, Seamus Kelly, elected to kick clear a ball he could have gathered in his hands. Unbelievably it struck his right-back McLoughlin on the back of the legs and ricocheted into the net for that bizarre winner.
UCD: Kelly; McLoughlin, Palmer, McDonnell, Fitzgerald; Bolger, Lynch, Kavanagh, Griffin; O'Byrne, Sherlock. Sub: Martyn for Bolger (66 mins).
Shelbourne: Gough; Costello, McCarthy, Scully, Smith; Baker, Fitzgerald, Fenlon, Rutherford; Kelly, S Geoghegan. Subs: D Geoghegan for Costello (76 mins), Neville for S Geoghegan (87 mins).
Referee: T Tully (Cork).