Famara Diedhiou came off the bench to fire a spectacular late winner as Bristol City edged out bottom-placed Wycombe 2-1 at Ashton Gate.
The hosts took a 23rd-minute lead when Callum O'Dowda tricked his way to the by-line on the left and delivered a perfect far-post cross for Chris Martin to net with a downward header.
Wycombe refused to lie down and Garath McCleary equalised after 68 minutes with a right-footed shot from inside the box that took a wicked deflection off City substitute Adrian Mariappa to wrong-foot goalkeeper Dan Bentley.
Having done so twice before this season, Diedhiou then proved the match-winner as a replacement when blasting an unstoppable right-footed shot past Ryan Allsop from just inside a crowded box with three minutes remaining.
After four defeats in five games, City head coach Dean Holden made two changes, bringing in Tyreeq Bakinson and Antoine Semenyo for Han-Noah Massengo and Taylor Moore.
Wycombe boss Gareth Ainsworth made five changes from the draw with QPR, including returns to the starting line-up for Darius Charles and Curtis Thompson, as his side looked to end a winless streak stretching back to early November.
The visitors made a bright start, with McCleary prominent on their right flank, but throughout the first half struggled to turn possession into decent chances.
Skipper Tomas Kalas was a rock at the back for City, who created the better openings on the break.
McCleary shot over for Wycombe shortly before Martin broke the deadlock, but soon after the opening goal Semenyo and Bakinson had efforts blocked as they looked to increase City's lead.
O'Dowda was giving Wycombe right-back Jack Grimmer the run-around and had a low shot saved after cutting inside from the left.
Martin should have made it 2-0 after 41 minutes when more good work by O'Dowda and a precise through ball put him clear. But the striker went for power, rather than placement, as Allsop advanced off his line and fired over.
The second half began with another great opportunity for the home side to double their lead. A brilliant run and pass from Semenyo set it up, but Nahki Wells shot wide of the far post with only Allsop to beat.
Wycombe capitalised on City's poor finishing when McCleary grabbed the equaliser just four minutes after Mariappa had replaced Zak Vyner.
Ainsworth's team were suddenly looking the more likely winners, reducing their opponents to some desperate defending.
O'Dowda's impressive contribution ended in the 77th minute when he limped off to be replaced by youngster Opi Edwards.
But City still created another clear chance when Semenyo burst clear only to shoot wide from the same position Wells missed from earlier.
It did not matter because 18 minutes after replacing Wells, Diedhiou emerged the hero again.
What the managers said…
Bristol City's Dean Holden: "It was an outstanding strike at the end of a really good move. Some of our passing today was a lot better than in recent games and we created good chances. Famara has not been able to train fully since picking up a suspension in our last home game, so I knew the best we could do was get 20 minutes out of him.
"That's three times he has won games for us as a sub this season, which says everything about his attitude. We were let down by our finishing at times and it looked as though it might cost us when Wycombe equalised."
Wycombe's Gareth Ainsworth: "I would have been disappointed with a draw on the balance of play. I can't quite work out how we lost. We looked the only team likely to win after equalising, but again we have paid for what are no more than minor errors.
"Every team we play know they have been in a game against us, but we keep losing by the odd goal. It may be that we just need a scruffy win without playing well to give us the boost we need. I would certainly take that at the moment, rather than losing when playing really well as we keep doing."