West Bromwich Albion was relegated from the Premier League on Tuesday after Southampton beat Swansea 1-0 to leave the Welsh club facing an uphill task to preserve its seven-year stay in the top flight.
Manolo Gabbiadini converted a close-range shot in the 72nd minute as Southampton moved three points above the drop zone and almost guaranteed its place in the Premier League next season thanks to a superior goal difference to its rivals.
Swansea stayed third from last - in the final relegation place - and now must beat already-relegated Stoke on the final day of the season on Sunday, while also requiring 17th-place Huddersfield to lose to Chelsea on Wednesday and Arsenal on Sunday.
"We must try to do our part and see if a miracle can happen," Swansea manager Carlos Carvalhal said. "We had things in our hands, and now we don't. We are depending on others."
The game is up, however, for West Brom, which cannot escape the bottom three heading into the final weekend.
West Brom did well just to survive this long, with relegation looking a certainty for months until Darren Moore took over as caretaker manager in early April as a replacement for the fired Alan Pardew.
Under Moore, West Brom is undefeated in five games and has beaten Manchester United and Newcastle away and Tottenham at home. The side needed a draw between Swansea and Southampton to keep alive its faint hopes, but Gabbiadini put paid to that.
The Italy striker has been used mostly as a substitute in recent months and he came off the bench again in the 68th minute against Swansea, with Southampton heading for an unsatisfactory draw.
Four minutes later, Gabbiadini was in the right place at a corner to turn the ball home - with the aid of a deflection - after Swansea goalkeeper Lukasz Fabianski pulled off a reflex save from Charlie Austin's volley.
Southampton hosts champion Manchester City in its final match and only has to avoid a heavy loss to extend its six-year stint in the Premier League.
"Nine-goal swing," Austin said. "It can be done, I suppose."
Southampton manager Mark Hughes celebrated wildly with his players on the field, a release of emotion for a coach who was facing being partly responsible for two clubs getting relegated.
Stoke was in the bottom three when it fired Hughes in January, and he took over at Southampton in March.
"Ever since we took on the challenge, we've come in and found a group of guys that needed a bit more direction and belief," Hughes said. "I thought they were immense tonight."
The victory was all the sweeter for Southampton after a turbulent build-up to the game that saw the team and coaching staff forced to change hotels at the last minute - meaning they had to stay near Cardiff - and then see their police escort to Swansea's stadium canceled.
Swansea is in relegation form at the wrong time, having lost its last four games without scoring. The team has scored just twice in eight games.