Derry City looked to have the points in the bag on Saturday night but two late Cork goals denting the Candystripes’ charge in the Airtricity Premier Division.
Kenny Shiels’ side led at Turner’s Cross through goal from Niclas Vemmelund’s after 54 minutes.
But Cork rallied in the last quarter and equalised through sub Danny Morrissey’s header in the 84th minute.
Derry were then sunk by another header with Kenny Browne powering home.
Aaron McEneff cleared Karl Sheppard’s shot off the line after 16 minutes while Sean Maguire and Gavan Holohan also went close to breaking the deadlock for Cork.
A determined Derry almost took the lead on 37 minutes through Danish defender Vemmelmund.
But his curling shot was brilliantly tipped round the post by Mark McNulty.
Shiels’ Danish import finally did find the net after the break, tucking home Barry McNamee’s corner from close range to cive the Candystripes the lead.
Visiting skipper Ryan McBride made an excellent last ditch tackle to prevent Maguire from scoring, and Derry looked set to hang on for their third win over of the season over Cork.
However the home team equalised with six minutes remaining when Morrissey headed home Greg Bolger’s free-kick and then they knew they were in with a chance of winning the game and they gave it their all, while Derry looked to hold on.
And Cork’s Browne headed home a corner in the first minute of stoppage time to leave Derry in tears.
The defeat leaves Derry in third place, 10 points behind leaders Dundalk and they now have work to do.