Cavan crashed out of the Football Championship as they collapsed in the second half of the qualifier against Longford at Kingspan Breffni Park.
The home side fought back from 0-5 to 0-2 down to lead 0-7 to 0-6 at the break - helped by four points from Eugene Keating.
But Paul Barden's goal put Longford in control and Brian Kavanagh's superb three-pointer extended their lead.
Cavan's Gareth Smith and David Givney were sent off in the closing stages.
Points from Kavanagh and Sean McCormack put Longford two ahead before two Keating points got Cavan on terms.
Cavan were playing with a strong first-half wind but two McCormack points and a Paul Barden score put Longford 0-5 to 0-2 ahead.
The Breffni County flattered before half-time as they hit five out of six scores to move into a 0-7 to 0-6 lead.
Longford took control after the break with scores from McCormack and Bernard McElvaney helped them move 0-10 to 0-8 ahead.
Then came the crucial moment of the match as Paul Barden ran unchallenged into the Cavan defence before hammering into the net.
With Cavan wilting in the closing stages, Longford were able to go into exhibition mode - highlighted by Kavanagh's stunning goal.
Cavan's day of woe was rounded up by the dismissals of Smith and David Givney.
Smith was sent off after tangling with Peter Foy with the Longford man perhaps fortunate only to earn a yellow card.
Givney was sent off in injury-time.