A dramatic 91st-minute goal by Derry substitute Johnny McIvor knocked Cork City off the summit of the Premier Division table and forced striker Pat Morley to wait another week at least to equal Don Leahy's alltime Munster scoring record.
In a game which was destroyed by a gale-force wind, Morley could have been hailed a hero in the 88th minute but Derry goalkeeper David Platt pulled off a magnificent "double" save to deny the Cork side.
And three minutes later, the home side stopped Cork in their tracks when McIvor squeezed the ball home from point-blank range after Andy Moran's shot had been parried by Cork goalkeeper Noel Mooney.
Having dominated the lion's share of the scoring chances while playing against the wind in the first half, Cork can thank Mooney for keeping the score-sheet blank at the break.
Mooney did particularly well to deny the hard-working Gary Beckett after just nine minutes when he dived low to parry the shot wide of the target.
Dave Barry's men emerged much more determined after the break and while Ollie Cahill came close to scoring in the 56th minute, it was the home side who continued to control affairs.
But Cork could have moved clear on the summit of the Premier Division table but for Platt's double save in the 88th.
Morley raced into the area as Platt advanced, the goalkeeper getting a superb block on the ball and when the rebound broke to Kelvin Flanagan, Platt again managed to get his body in the way of the shot and the chance was lost.
But one minute into added time, Derry's persistence paid off. Eddie McCallion worked the ball into the danger area before Moran's shot was parried by Mooney. With McIvor alert to the situation, the winger ghosted in to drive a low shot to the net from close range.
Afterwards a delighted Derry boss, Kevin Mahon, felt the win was justified.
"Many would have settled for a scoreless draw before the kick-off but having watched our players perform in terrible conditions, they thoroughly deserved to win," he said.
DERRY CITY: Platt; McCallion, Hutton, Kelly, Hargan; Moran, Hegarty, Doherty, Gallagher; Beckett, McCaul. Sub: McIvor for Gallagher (69 mins).
CORK CITY: Mooney; Napier, Hill, Daly, Cronin; Cahill, Herrick, O'Brien, Flanagan; Morley, Glynn. Sub: Freyne for Herrick (31 mins).
Referee: H Byrne (Dublin).