Nigel Pearson's Bristol City moved six points clear of danger in the Championship as they beat a wasteful Stoke City at Ashton Gate.
Stoke had a chance to climb to third in the table - but Tyreeq Bakinson netted the only goal of the game on 38 minutes.
And the Potters ended with 10 men after Wales midfielder Joe Allen was red carded for a second bookable offence in the seventh minute of injury time.
Pearson's first win since returning to duty following a Covid-related illness came in only his second game back.
It was also only City's second home win in 20 games - and was secured when Tomas Kalas powered a long throw right into the heart of the penalty area, Chris Martin rose to meet it with a headed flick-on - and Bakinson got there first to guide the ball home.