Armagh reeled off 1-2 in the closing stages to beat Longford by 1-11 to 1-10 in a thriller at the Athletic Grounds.
As both teams went into the game with 100% records, this was a massive match and Denis Connerton's men looked to have done enough when leading by 1-10 to 0-9 after 64 minutes.
They led by 0-8 to 0-5 at the interval and Donal McElligott's penalty goal in the 57th minute seemed to have finished the job.
But the dismissal of Andrew Farrell for a second yellow card three minutes after the restart caught up with the midlanders and Ethan Rafferty (1-4) netted in the 68th minute before captain Rory Grugan swung over a dramatic winner for Kieran McGeeney's high-flying heroes.
Westmeath's John Heslin with Daithi Waters of Wexford. ©INPHO/Tommy Dickson.
In today's other third-tier clash, Westmeath picked up their second win of the campaign when inflicting a 0-16 to 1-13 defeat on pointless Wexford at Wexford Park.
The winners were guilty of 18 wides but John Heslin steered over six points and Tiernan Rossiter's late goal for the hosts was of no consequence in the end.
Derry V Offaly and Sligo V Fermanagh both fell foul to the inclement weather that battered the country.
Armagh - B Hughes; P Burns, A McKay, B Donaghy; N Rowland, G McCabe (0-1), M Shields; S Sheridan (0-1), C Vernon; R McShane, A Forker, N Grimley (0-1f); R Grugan (0-3, 1f), B Crealey (0-1), E Rafferty (1-4). Subs: A Duffy for R McShane, M Stevenson for B Crealey, J McElroy for B Donaghy, A Findon for S Sheridan, R Kennedy for A Duffy (BC).
Longford - P Collum; P Fox, P McCormack, D McElligott (1-0pen); M Quinn (0-1), B Gilleran, D Mimnagh (0-1); D Gallagher, A Farrell; B McKeon, D McGivney (0-2f), D Reynolds (0-2); R Smyth (0-3f), C Berry, R Brady. Subs: P Foy for P McCormack, J McGivney (0-1) for D McGivney (BC), R McEntire for R Brady.
Referee - N Mooney.
Westmeath - E Carberry; M McCallon, K Daly, D Whelan; N Mulligan, F Boyle, J Dolan; T McDaniel (0-1), J Heslin (0-6, 2f, 1'45); K Martin (0-1), R O'Toole (0-1), G Egan (0-1); C McCormack (0-2), L Loughlin (0-3), S Duncan. Subs: F Coyne (0-1) for T McDaniel, N Scally for D Whelan, A Gardiner for K Martin.
Wexford - M Doyle; M O'Neill, J Rossiter, C Carty; G Malone, B Malone (0-1), E Nolan; D Waters, N Doyle; T Rossiter (1-0), B Brosnan (0-4, 3f), R Frayne; P Curtis (0-3), J Stafford (0-2), B O'Connor. Subs: B O'Gorman for E Nolan, C McCabe for B O'Connor, D Shanley for R Frayne, S Doyle for B O'Gorman, M O'Connor for M O'Neill, S Byrne for D Waters.
Referee - B Cawley.