Adam Nagy scored Bristol City's winner as they came from behind to beat QPR 2-1 despite being on the back foot for most of the match.
Rob Dickie's first goal for Rangers - a header from Chris Willock's left-wing cross - put the hosts ahead before Nahki Wells equalised against the run of play shortly before the break.
And Nagy's goal five minutes into the second half took his side up to third in the Sky Bet Championship table.
Both teams had chances prior to Dickie's 11th-minute goal.
The best of them fell to Nagy, who shot wide after a one-two with Chris Martin left the Hungarian through on goal.
At the other end, Lyndon Dykes was unable to get a decisive header to Ilias Chair's right-wing cross.
And Bright Osayi-Samuel, who gave Jay Dasilva a torrid time before the left-back was replaced at half-time, was denied by 'keeper Daniel Bentley after racing onto Yoann Barbet's ball over the top.
But Bentley couldn't rescue the visitors when Dickie held off City captain Tomas Kalas to nod home the opener.
Rangers then took complete control. Tom Carroll's goal-bound shot struck Nagy, who gave the ball away following the resulting corner, enabling Dickie to tee up Willock, whose shot was cleared off the line by Robins debutant Adrian Mariappa.
Chair fired narrowly wide as Rangers continued to dominate without managing to score an all-important second goal.
Having been overrun for most of the first half, the Robins levelled five minutes before the interval.
Wells, who had two loan spells with QPR, got in front of Lee Wallace to score from a yard out after Callum O'Dowda's low cross from the left had deflected off Rangers' Dominic Ball.
Another low left-wing cross from O'Dowda led to City going ahead.
He pounced on Dickie's misplaced pass to Carroll and the Irishman's ball into the box, which was aimed at Wells, ended up falling to Nagy, who coolly slotted past 'keeper Seny Dieng.
City then found themselves under sustained pressure again but Rangers lacked the fluency they had in the first half and Tommy Rowe, who replaced Dasilva, fared much better against the always dangerous Osayi-Samuel.
Macauley Bonne and Osayi-Samuel missed their best chances to equalise.
Substitute Bonne shot wide from near the edge of the six-yard box before Wells went close to adding a third for City when his late free-kick clipped the post.
And in stoppage time, Osayi-Samuel fired wide of the near post from close range.
What the managers said...
QPR's Mark Warburton: "For the first time as a manager in many years, I didn't know what to say to the players. You can't rollock them because they were so good for such a long period of the game against a very good Bristol City team. We've got a lot of young players. What do you say to them after that? They were so, so good for long periods - and right to the death.
"We created chance after chance. We did it against Brentford and again tonight. We've dropped six points when we really played some excellent football. They've got to build that belief in how good they are and how good they can be."
Bristol City's Dean Holden: "We got too stretched in the first half and it can become frustrating when you don't get as much of the ball as you'd like. In the second half it was just about making sure you have more of a solid block so the gaps aren't as big.
"Bright I thought was outstanding. I've watched him for a number of years now and he's a top player in this division. I think Bright was getting the ball a bit too easily and he's a very good player in this division when he gets the ball at his feet. It was also about stopping the supply into him. We did that more in the second half and he was then relatively quiet."