Longford caused a huge upset as they ended League finalists Derry's Football Championship hopes by winning a thrilling qualifier at Celtic Park.
Derry led 0-7 to 0-3 but Paul Barden's goal helped the visitors move into a 1-6 to 0-7 advantage by the break.
Longford extended their lead to five but goals by Benny Heron and Mark Lynch helped Derry draw level.
Lynch's goal was a stunning strike but Mark Hughes netted at the other end to re-establish Longford's control.
Barden, Francis McGee, Brian Kavanagh and in particular midfielder Michael Quinn were among a host of Longford heroes and there was no doubting that the visitors were worthy winners as the Leinster county earned their third qualifier win over the Oak Leafers.
Derry went into the game amid something of an injury crisis with midfielders Fergal Doherty and Patsy Bradley missing along with several other regulars including Emmett McGuckin and Dermot McBride.
Cailean O'Boyle's departure to America also reduced Brian McIver's attacking options but the Oak Leafers, on home turf, were still expected to beat a Longford side who will play in the Division 4 of next year's League.
Derry appeared in control early on with teenage debutant Terence O'Brien among the scorers as they hit the opening three points.
Two Sean McCormack points and a Kavanagh score helped Longford level before two Lynch points contributed to Derry moving into a 0-7 to 0-3 lead.
However, Longford were on terms by the 30th minute after Kavanagh's superb pass set up Barden to rattle the net.
Further McCormack and Barden points put Longford two ahead by the break and their advantage became four following additional efforts from Shane Mulligan and the superb Quinn.
After Derry had cut the margin to two points, Longford appeared to have the game firmly under control as they stretched their advantage to five with 15 minutes left.
However, Derry were back in the contest when substitute Herron volleyed soccer style to the net with 10 minutes remaining.
And while a McCormack point extended Longford's lead to three, the momentum appeared to be with Derry when Lynch hammered in a stunning equalising goal from all of 25 yards with six minutes left.
But incredibly, Longford restored their three-point advantage within 60 seconds as Hughes kept his cool to net after a surprise pass from McGee.
To their credit, Derry responded to cut Longford's lead to the minimum with a minute to go but Kavanagh's steadying point ensured a famous away win for Jack Sheedy's side.
Derry: T Mallon, O Duffy, C McKaigue, A McAlynn, G McKinless, M Craig, S L McGoldrick, M Lynch, K Johnston, A Devlin, E Bradley, E Lynn, J Kielt, T O'Brien, C McFaul
Longford: D Sheridan; D Brady, B Gilleran, F Battrim; C Smith, E Williams, S Mulligan; J Keegan, K Diffley; M Quinn, F McGee, P Barden; A Rowan, B Kavanagh, S McCormack
SATURDAY'S OTHER RESULTS
All-Ireland SFC qualifiers
Limerick 1-16 1-13 London
Laois 1-19 2-15 Fermanagh
Wicklow 3-12 0-17 Offaly
Connacht SFC semi-final
Sligo 0-11 0-16 Galway
Munster SFC semi-final
Cork 0-16 1-11 Tipperary