Wigan 2-3 Swansea
Wigan's hopes of staying in the Premier League were left hanging in the balance as Swansea twice came from behind to win a thriller at the DW Stadium.
Roger Espinoza's volley gave the hosts the lead on the stroke of half-time, but Angel Rangel hit back for Swansea.
James McCarthy restored Wigan's lead but goals from Itay Shechter and Dwight Tiendalli gave the visitors victory.
Defeat leaves Roberto Martinez's side three points from safety with just two matches of the season remaining.
They are one victory away from drawing level on points with Newcastle, Norwich and Sunderland, with the Black Cats having a far superior goal difference.
This is Wigan's fourth season battling against relegation from the top flight but there was a subdued mood inside the DW Stadium at the final whistle after the team lost their game in hand on their relegation rivals when victory would have lifted them out of the bottom three.
Victories in their final two matches of the season, against Arsenal and Aston Villa, may no longer be enough but for now the club has an FA Cup final to look forward to on Saturday.
There was precious little cause for Wigan optimism on the night, but at least news of Manchester City's victory over West Brom brought with it the certainty that the club which Dave Whelan built will be playing in the Europa League next season.
Swansea had failed to win in any of their previous seven league matches but their second-half performance, coupled with the obvious tension that affected Wigan, meant the visitors preserved their unbeaten run against Wigan in the Premier League.
The opening 45 minutes were high on tension but low on technique. On both sides, the football was physical and full-blooded but devoid of the necessary finesse. Passes went astray, shots and crosses flew high and wide and it seemed individualism might prove the best means of producing a breakthrough. And so it proved.
With what was his side's second meaningful shot on goal, Espinoza shattered the mediocrity with the half's single moment of brilliance.
Into time added on at the end of the first half the Honduran gathered Swansea goalkeeper Michel Vorm's half-hearted punch on the edge of the penalty area, composed himself, and unleashed a fierce left-footed volley that flew into the net from 16 yards.
The visitors emerged from the interval with more intent, their forays grew in focus and one movement, more coordinated than anything they managed in the first period, produced an immediate equaliser.
Wayne Routledge's delightful raking cross found Rangel in the space between Paul Scharner and Espinoza, the Spaniard connecting with a deft first-time finish that found its way into the net via a flick off the post to stun the DW Stadium.
But the equaliser roused Wigan, who were level just three minutes later.
Gary Caldwell strode through the centre of the Swansea midfield, picked out a charging McCarthy with a pin-point low pass and the Wigan midfielder held off a flagging Ashley Williams and drove a low shot beyond Vorm to regain the lead.
Swansea took full advantage of the obvious tension that was affecting Wigan - Pablo Hernandez seized on Caldwell's loose clearance, found Shechter and the young striker fired his shot at goal which found the net thanks to a fortunate deflection. Wigan came again, but they were inhibited now, struggling for fluency.
The visitors had no such burden and continued to find openings. Hernandez found space wide on the left flank and his cross caused confusion between James McArthur and Shaun Maloney, neither cleared and the bouncing ball fell to Tiendalli, whose weak finish was enough to beat Wigan goalkeeper Joel Robles.
A nasty injury to Vorm saw him stretchered off in the final 10 minutes as Wigan peppered the Swansea goal, with Caldwell, Arouna Kone and Maloney all going close. But Swansea stood firm to leave Wigan's Premier League status in doubt before the FA Cup final against Manchester City at Wembley on Saturday.