Cork will tangle with Kerry for a third time this summer after the Munster champions squeezed past Donegal in a tension-filled 1-11 to 1-10 quarter-final win at Croke Park.
In front of a 51,169-strong crowd, Cork centre-back Ger Spillane was the unlikely match-winner as he struck the crucial score, two minutes into injury-time.
The win means the Rebels will renew rivalries with Kerry in an All-Ireland SFC semi-final on Sunday, 20 August.
This afternoon, a fourth-minute goal – fisted home by team captain Christy Toye – helped Donegal push into a 1-05 to 1-01 lead, but points from James Masters and Fintan Goold reduced the gap to two by the break.
John Hayes had netted a 12th-minute penalty for Cork, after Barry Monaghan had brought down man-of-the-match Nicholas Murphy.
The second half was nip-and-tuck, with a Michael Doherty free initially putting Donegal three points clear. Cork clawed back into it with Sean O'Brien drawing the sides level for a third time – at 1-10 apiece – on 62 minutes.
Substitute Adrian Sweeney, Doherty and Ciaran Bonner each drew a blank in front of the Cork posts in a dramatic finish but Spillane, taking a superb offload from Murphy, settled the affair with his clipped shot.
The demise of both Armagh and Donegal today means there will be no Ulster representatives in the All-Ireland semi-finals for the first time this century.
Cork or Kerry will gone on to battle it out with the winners from the other side of the draw – either Dublin, Westmeath, Laois or Mayo.
Showing one late change, with Goold stepping in for shoulder injury-victim David Niblock, Cork looked decidedly poor in the first half with their championship top scorer Masters – 1-21 in three games – being marked out of the game by Karl Lacey.
That has always been the danger for Cork this year, if the opposition can nullify the threat of Masters, where will the scores come from? But thankfully for manager Billy Morgan, he had seven players, as well as his Nemo maestro, to count on for points at Headquarters.
Donegal rubbished the notion that this game was too soon for them, coming just six days after their qualifier win over Fermanagh, as they made an imposing start.
Rory Kavanagh took the initiative with a first-minute point, and Toye was in the right place at the right time, three minutes later, when Kavanagh knocked a Doherty free into his path to palm the ball to the Cork net.
However all-action midfielder Murphy got Cork up and running when he won a soft penalty and corner forward Hayes' rather tame shot was fortunate to hit the back of the net off 'keeper Paul Durcan's right hand.
At the other end, Leon Thompson almost nabbed a goal of his own but the Naomh Conall forward forgot his poacher's instinct. When put clean through, he chipped over the bar with only Alan Quirke to beat.
Nevertheless, that point and a '45' from the fit-again Doherty had Donegal 1-03 to 1-00 clear by the 17th-minute. Hayes nipped in for Cork's first score from play after 24 minutes, only for Thompson and Barry Dunnion to crack over points and leave Donegal 1-05 to 1-01 clear coming up to the half-hour mark.
Cork looked short of ideas and like half-time could not come quick enough, but just as their arch rivals Kerry managed in their earlier clash with Armagh, they hit two critical points just before the interval to reduce the arrears.
Doherty cancelled out one of those scores out on the restart but a concerted spell of pressure from Morgan's men yielded four points in the space of five minutes as they moved ahead for the first time.
Spillane sprinted forward to fist over the first, then Pearse O'Neill, set up by his midfield colleague Murphy, Masters and Donnacha O'Connor (both frees) all fired over to send Cork into a 1-07 to 1-06 lead.
Donegal, helped in no small terms by the introduction of lively substitutes Colin Kelly, answered back straight away with three points of their own – Monaghan, Doherty (free) and Kelly, with a scrumptious shot from wide out on the right, quickly put the umpires to work at the Hill 16 end.
The beaten Ulster finalists remained two points in front after Kevin McMahon and Ciaran Bonner had swapped scores. But crucially, right on the hour, Toye lost possession in midfield and Masters gathered it to solo ahead and point Cork back within one at 1-10 to 1-09 down.
Unfortunately for Toye, that proved to be the turning point. Cork midfielder Murphy, who had been lording it under the high ball, plucked a series of inspirational catches out of the sky to see his side wrestle the lion's share of possession away for the closing stages.
One such leap allowed wing forward O'Brien the time and space to land the levelling point. Former All Star Adrian Sweeney, only just on as a substitute, had a good chance to add to Donegal's tally but he got his angles wrong from a 68th-minute free.
With time running out, a draw looked certain. The youthful legs of the Donegal side never tired, but it must have played on their minds that they had drawn both of their previous quarter-finals against Dublin (2002) and Galway (2003).
Cool heads were called for in injury-time but a loss of possession allowed a high ball be pumped right in on top of the Donegal defence. Murphy rose highest, fielding excellently and drawing in two men before laying off for the unmarked Spillane, who had minutes earlier pulled off a supremely-timed block on Stephen McDermott, to dink over the all-important score.
Donegal had two minutes left to find an equaliser and manfully, they earned a chance for free-taker Doherty from 55 metres out. His effort waned away to the left and while Ciaran Bonner was able to collect it and get another sight at the posts, the wing forward's shot dropped frustratingly short and it was game over.
Cork's third quarter-final win – they also beat Mayo in 2002 and Galway last year – maintains their momentum a full 19 days after their Munster final replay defeat of Kerry.
Cork: A Quirke; M Prout, D Kavanagh (capt), K O'Connor; M Shields, G Spillane (0-02), A Lynch; N Murphy, P O'Neill (0-01); S O'Brien (0-01), F Gould (0-01), K McMahon (0-01); J Masters (0-03 (2f)), D O'Connor (0-01 (1f)), J Hayes (1-01 (1-00 pen)).
Subs used: G Murphy for Prout, C McCarthy for Gould, K O'Sullivan for Hayes, D Goulding for McMahon.
Donegal: P Durcan; N McGee, E McGee, K Lacey; T Donoghue, B Monaghan (0-01), B Dunnion (0-01); N Gallagher, B Boyle; C Bonner (0-01), M Hegarty, R Kavanagh (0-01); L Thompson (0-02), C Toye (capt) (1-00), M Doherty (0-03 (2f, 1'45')).
Subs used: C Kelly (0-01) for Hegarty, S McHugh for Kavanagh, S McDermott for Boyle, A Sweeney for Thompson.
Referee: Tomas Quigley (Dublin).