Swansea kept their Sky Bet Championship play-off ambitions alive as a 1-0 win ended Bristol City's own hopes of extending the season.
Connor Roberts settled an entertaining contest in first-half stoppage time after Conor Gallagher had hit the woodwork, the Wales defender's first goal since April 2019.
Bristol City were given a 69th-minute lifeline when substitute Famara Diedhiou, who had only been on the pitch a minute, was bundled over in the box.
But Diedhiou rattled the post from 12 yards and the miss summed up a Robins' performance which was high on endeavour but short on composure.
Swansea's play-off hopes now ride on winning their final game at Reading and Welsh rivals Cardiff - 3-1 winners at Middlesbrough on Saturday - losing at home to relegation-haunted Hull.
Former Swansea captain Ashley Williams started for Bristol City after completing a four-match ban and saw Gallagher fire just over from 20 yards early on.
But Williams was soon striding out of defence and allowing Jay Dasilva to send over a cross which Nakhi Wells should have planted inside the post and not wide from six yards.
Bristol City were the slicker side in the opening quarter but the visitors were fortunate to survive when Jake Bidwell's cross caused confusion and Andre Ayew poked a bobbling ball close to the far post.
Swansea had struggled to get Liverpool loanee Rhian Brewster, five goals in seven games since lockdown, into the contest but they slowly began to get on top.
Matt Grimes and Ayew both went close from distance before Roberts and Brewster failed to get a telling touch to Bidwell's centre which flashed across the six-yard box.
Brewster also volleyed wide as Ayew attempted an overhead kick in front of him but Swansea went ahead seconds before the break.
Gallagher's 20-yard effort bounced back off a post but Roberts had stayed onside to follow up and slide home his first goal of the season.
Bristol City knew their campaign was on the line and started the second period strongly, with Wells twice heading over.
Brewster had been kept quiet since the restart, but he broke free on the left to unleash a 20-yard drive which tested Bentley before the goalkeeper comfortably collected Ayew's follow-up effort.
Bristol City made a triple substitution midway through the second half and Diedhiou instantly made his presence felt as he went to ground under Ben Cabango's challenge.
The Senegalese striker took the penalty himself but sent it against the post and the rebound struck him before going out for a goal kick.
Ayew almost added a second for Swansea in the dying moments and they will go into the final game hoping for a dramatic ending to the season.
What the managers said...
Swansea's Steve Cooper: "In the Championship, we know that anything can happen. All we can do is take care of our business and try and win at Reading. Hopefully, we can play as well as we did here. We have really seen our younger players grow up in recent weeks. Even in the down moments - which you have to go through to be a first team player - they have come through well.
"It was a good game with two teams going for the win. It took us a time to settle down, but we played some really good football. I really liked the look of us and then it was a good time to score just before half-time."
Bristol City caretaker Dean Holden: "It's a major disappointment, it's raw at the moment. The play-offs were the target at the start of the season. There is plenty still to play for and we have to finish the season on a high.
"I didn't see Cardiff's result until the end. I told the players if the teams above us didn't win and we didn't do the business that would have been a tough one to take. The game is won and lost on fine margins. Who knows what would have happened had we put the penalty away?"