It took one of the best second-half displays of the season for Donegal to maintain their top-flight status at MacCumhaill Park, Ballybofey.
In difficult conditions, Armagh coped much better in the opening half. With Michael Stevenson imperious from placed balls, the half-time lead of 0-7 to 0-5 did not flatter the visitors, who had drafted in Crossmaglen pair Jamie Clarke and Aaron Kernan from the start.
It took a courageous block from Paul Durcan to deny Brian Mallon after just three minutes and Armagh were much more clinical.
It didn't look good for Donegal when Stevenson struck again for two more frees at the start of the second half, but Armagh could add only one more point in the final 32 minutes.
Donegal looked to have lost their way when they hit three bad wides in succession but thanks to the promptings of Neil Gallagher from midfield, they slowly took control and good points from Colm McFadden and corner-back Frank McGlynn had them level with 10 minutes left.
Donegal were fortunate when Clarke hit an upright with the goal at his mercy, and they kicked on with Rory Kavanagh pointing them in front for the first time and they looked the better side in the closing stages, although Armagh did have another goal chance in the dying seconds.
"We asked them the question at half-time and their mentality in the second half was brilliant -- they delivered in spades," said Donegal manager Jim McGuinness.
"We were without Michael (Murphy), Neil McGee was injured in the warm-up and we were also without Christy Toye. Our squad was stretched but the 15 and those that came in, we were very happy with them.
"It definitely wasn't a perfect performance. There were a lot of mistakes made. But we showed a hunger, desire and determination. The normal situation after kicking bad wides is that heads might go down, but this wasn't the situation."
Armagh manager Paddy O'Rourke, felt it was a game that could have been won. "We had a chance to win it. It was a draw when Jamie's shot hit the post. If that had gone in it was over. But it didn't happen and fair play to Donegal, they fought to the end and are deserving winners."
Man of the Match: Neil Gallagher (Donegal)
Scorers -- Donegal: C McFadden 0-5 (2f), R Kavanagh 0-2, F McGlynn, L McLoone, M McElhinney, D Molloy, M O'Reilly, A Hanlon 0-1 each. Armagh: M Stevenson 0-7 (7f), B Donaghy, C McKeever, B Mallon 0-1 each.
Donegal -- P Durcan 7; F McGlynn 7, E McGee 6, Declan Walsh 8; A Thompson 5, K Lacey 5, L McLoone 7; R Kavanagh 8, N Gallagher 8; M McHugh 5, R Bradley 7, D McLaughlin 5; David Walsh 6, C McFadden 7, M McElhinney 5. Subs: D Molloy 5 for McLaughlin 27, P McBrearty 5 for McElhinney 30, M O'Reilly 6 for E McGee 59, S Griffin 5 for McBrearty 69, A Hanlon 5 for McLoone 71.
Armagh -- P McEvoy 6; A Mallon 6, B Donaghy 7, D McKenna 6; P Duffy 5, C McKeever 8, F Moriarty 7; A Kernan 6, C Vernon 7; B Mallon 7, J Clarke 7, A Duffy 6; M Stevenson 7, C Rafferty 6, K Dyas 6. Subs: T Kernan 6 for P Duffy (h-t), J Lavery 5 for Moriarty (50), M O'Rourke 5 for B Mallon (45), G McParland 5 for Stevenson (58), J Kingham 5 for T Kernan (69).
Ref -- C Reilly (Meath).