This crucial National League tie at Turner's Cross ended in confusion and controversy yesterday with Shelbourne threatening to demand a replay after the referee had blown 15 seconds before time and failed to play four minutes of added time.
Cork picked up three vital points despite playing poorly as Shelbourne finished the match with only nine players after Tony McCarthy and Greg Costello were sent off in the closing quarter.
The issue that infuriated Shelbourne, however, was a mistake in timing the second half for the fourth match official had no sooner raised the board showing that four minutes extra time would be played when referee Jimmy O'Neill (Waterford) blew the full time whistle to spark off furious protests by Shelbourne.
Manager Dermot Keely and club secretary Ollie Byrne both raced to the centre of the pitch to voice their protests and the referee was surrounded by match stewards as he made his way to the dressing room.
Afterwards he declined to comment but confirmation that a mistake in timing the second half had been made was forthcoming from referee's inspector Pat Kelly.
He said: "The referee made a genuine mistake. He indicated to the fourth official that he intended to add on four minutes.
"By the time the official raised the board showing four minutes extra time the referee calculated that he had played two minutes of that already and when he checked his watch soon afterwards he thought the time had elapsed.
Afterwards Keely said: "I couldn't believe it. No sooner had the board gone up showing four minutes extra time, but 10 seconds later the referee blew the whistle.
"If this were a GAA match it would be replayed and it is totally inexcusable because the referee failed to play one minute of extra time as well at the end of the first half."
The manager said he would discuss the issue with the Board of Shelbourne before they decided what course of action to follow. But as they left the ground Shelbourne were threatening to demand that the National League must replay the game.
Shelbourne were unlucky to loose the match for Cork failed to strike their best form.
The Dubliners had an experimental look with Stephen Geoghegan, Dean Fitzgerald and Dave Campbell all dropped despite their win over Bohemians last weekend and a new signing Neil Trebble made his debut at centre forward.
Trebble was signed from English non-league club St Alban's on Friday and he scored Shelbourne's goal after 76 minutes when substitute Stephen Geoghegan robbed Cork defender, Derek Coughlan and set up a simple chance.
Cork were two goals in front at that stage after John Caulfield had scored their first in the 38th minute and Noel Hartigan had claimed the second 12 minutes into the second half.
Cork were sharper in front of goal and their opening goal came against the run of play after Pat Fenlon had struck a shot against an upright and goalkeeper Noel Mooney had saved well from Dessie Baker.
Cork's second goal seemed to settle the match but the introduction of Geoghegan revitalised Shelbourne and Trebble's goal meant some anxious moments for Cork.
The dismissal of Tony McCarthy, six minutes from the end after a clash with Patsy Freyne for which the Cork-man received a yellow card did not help Shelbourne's cause and the loss of Greg Costello two minutes later for a second bookable offence after he handled the ball undermined them still further.
Still they looked threatening every time they got the ball into Cork's penalty area and are certain to take the issue of the short time into the National League chambers.
Cork City: Mooney, Daly, Coughlan, Hill, Cronin, Barry Murphy, Herrick, Freyne, Cahill, Caulfield, Hartigan, Subs: O'Halloran and Dobbs for Barry Murphy and Hartigan (82 mins), Cotter for Freyne (89 mins).
Shelbourne: Gough, Heary, Costello, McCarthy, D Geoghegan, Baker, Doyle, Fenlon, Keddy, Sheridan, Trebble. Subs: S Geoghegan for Sheridan (67 mins), Fitzgerald for Doyle (70 mins).
Referee: J O'Neill (Waterford).