Donegal 1-12 Armagh 1-11
Paddy McBrearty came to the rescue with a 69th-minute winning point as Donegal booked their All-Ireland football semi-final spot with a 1-12 to 1-11 win over Armagh.
A shock quarter-final victory for Armagh looked on the cards when Paul Grimley's underdogs led with three minutes to go.
But a 68th-minute leveller from captain Michael Murphy, his fifth of the evening, was followed by McBrearty's dramatic winner from out on the left wing.
It booked the 2012 All-Ireland champions a semi-final clash with Dublin or Monaghan back at Croke Park on 31 Augus.
But Donegal will feel they need to improve with just six of their 12 points overall coming from open play as Armagh threatened a serious upset.
Those anticipating a tight, tactical battle were proven correct.
Donegal scored just one point from open play in the first-half though still took a two-point lead into the interval.
That was mainly due to Armagh's wasteful play with seven wides costing them dearly in the opening half.
Paul Grimley's side moved 0-03 to 0-01 ahead after 20 minutes but also hit six wides in that period.
Donegal made them pay for the profligacy with a well-taken 23rd-minute Odhran MacNiallais goal.
They'd played second fiddle until then and were beaten at midfield where Stephen Harold and Aaron Findon reigned.
But when MacNiallais took a Ryan McHugh pass, stepped inside Findon and shot a clever left footed shot to the near post, he scored a crucial goal.
It put Donegal back on the front foot at 1-01 to 0-03 and though the sides were level twice more, the 2012 champions maintained the upper hand.
It wasn't football for the purist and a number of running battles around the pitch eventually resulted in a yellow card being shown to Findon in the 11th minute .
When the sides left the field at half-time, Donegal talisman Karl Lacey clashed with Aidan Forker, summing up the atmosphere of the half.
Donegal were delighted to lead by 1-05 to 0-06 at the break because Armagh at least broke even in general play.
The Orchard kicked five of their six first-half points from play with Stefan Campbell, their Man of the Match against Meath, nailing one beauty.
Donegal moved three clear for the first time after 45 minutes at 1-8 to 0-8 when McFadden curled over a free.
They retained a three-point advantage with 11 minutes to go and looked to be in a strong position.
But 1-01 from Armagh in a minute turned the game on its head. Tony Kernan hit a great point, his fourth, before Campbell forced a 60th-minute goal, his palmed effort rebounding off goalkeeper Paul Durcan's back and over the line.
That moved Armagh 1-10 to 1-09 ahead and they remained one up with three minutes left.
But those points from experienced duo Murphy and McBrearty ultimately tipped the game in Donegal's favour and they move on.
Donegal: P Durcan, P McGrath, E McGee, N McGee (0-01), R McHugh, K Lacey, A Thompson, O MacNiallais (1-01), N Gallagher, C Toye, M Murphy (0-05, 4f), F McGlynn, C McFadden (0-03, 2f), L McLoone, P McBrearty (0-02).
Subs: R Kavanagh for Toye, M McElhinney for McLoone, D O'Connor for McFadden, M O'Reilly for McBrearty.
Armagh: P McEvoy, A Mallon (0-01), C Vernon, F Moriarty, M Shields, B Donaghy, A Kernan (0-02, 1f), S Harold, A Findon, A Forker (0-01), S Campbell (0-01), T Kernan (0-04, 1f), J Clarke, K Dyas, K Carragher (0-01). Own-goal: 1-0
Subs: B Mallon for Carragher, E Raffert for Findon, R Grugan for Dyas, M Murray (0-01) for A Forker, K Toner for Harold.
Referee: J McQuillan (Cavan).