With Cavan and Roscommon having long since secured promotion, only the final relegation spot was up for decision in Division 3.
After the Breffni men warmed up for their league final date with a 0-18 to 0-14 dismissal of Limerick on Saturday night, Longford knew that a win away to Wexford would be enough for them to survive in the Treaty County's place.
Unfortunately for Longford, they couldn't pull it off, despite two late goals.
The sides were deadlocked at 0-08 apiece at the break before Wexford raised, their game and Kevin O'Grady's goal helped them into a commanding 1-15 to 0-10 lead as time ticked away.
Longford, unbelievably, scored two goals in the final minutes but couldn't find a decisive third as Wexford held on.
Elsewhere, Roscommon warmed up for their meeting with Cavan by beating Connacht rivals Sligo 0-12 to 1-06.
James Kilcullen raised the green flag for Sligo, who led 0-05 to 0-04 at the break before the Rossies pulled away.
Offaly were already down but went out fighting, with Fermanagh needing a late goal to secure a draw.
The sides shared five goals between them, the hosts racking up 3-10 to Offaly's 2-13.