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 Nahki 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.