Cardiff scored twice in the space of four minutes to win 2-1 at QPR and deal another blow to the west London side’s promotion hopes.
Rangers, now with just one win in seven Sky Bet Championship matches – a run which has included four defeats, went ahead through Andre Gray’s first-half opener.
But goals from City youngsters Isaak Davies, 20, and Rubin Colwill, 19, turned the match on its head.
Substitute Davies equalised with 20 minutes remaining with the help of an error by former Cardiff goalkeeper David Marshall.
Davies brushed defender Rob Dickie aside, cut in from the left and fired in a shot which Marshall got both hands to but the ball looped over the Scotland international and over the line before he was able to claw it away.
And the bustling Davies causing Dickie more problems led to the visitors going ahead in stunning fashion.
Davies again went past Dickie, who shoved him to the ground near the edge of the penalty area, and Colwill brilliantly smashed the resulting free-kick into the top corner.
A mistake by Perry Ng had led to QPR going ahead after 38 minutes.
Moses Odubajo’s right-wing cross was headed by Ng straight to Gray, who gratefully blasted home from eight yards out.
Gray had earlier been denied by former Rangers goalkeeper Alex Smithies, who produced a fine near-post save to push away the striker’s header from Ilias Chair’s cross.
The hosts continued to threaten after going ahead, with Smithies keeping out Lee Wallace’s strike shortly before Chris Willock’s deflected shot flashed wide of the post.
Jordan Hugill, who was previously on loan at QPR, had chances for Cardiff either side of half-time but fired the first straight at Marshall and wasted the second by blasting over after a Bluebirds counter-attack.
A Rangers counter-attack led to a great chance for Gray midway through the second half but he steered a first-time effort wide of the target after being found by Willock’s perfectly-weighted ball from the right.
Had that chance been taken, the game might well have been beyond Cardiff, but they emphatically made the most of the reprieve.
Wallace shooting over from distance was the closest Rangers came to an equaliser.