Yoann Barbet's goal gave QPR an unlikely 1-0 victory at home to Blackburn in the Sky Bet Championship.
Barbet's winner, scored nine minutes into the second half, was the French defender's second goal of the season and came against the run of play.
Blackburn were punished for failing to deal with Ilias Chair's left-wing free-kick. Rob Dickie stabbed the ball towards goal and Jarrad Branthwaite's block inadvertently teed up Barbet, who gratefully thumped home from close range.
It gave Rangers their fourth win in five matches and their first goal in six home games.
Their previous three wins had all been away from the Kiyan Prince Foundation Stadium, where Mark Warburton's side had lost three consecutive matches and five of their past six.
Their season has been blighted by a failure to take their chances in front of goal - but this time it was their play-off chasing opponents who were beaten despite being on top for large spells.
Todd Kane missed a great opportunity to give QPR an early lead when he steered wide at the far post after good work on the left by Chair.
But Rangers were on the back foot for much of the first half, with the excellent Adam Armstrong causing them major problems.
He was denied by a fantastic save by goalkeeper Seny Dieng, who somehow clawed the striker's free-kick away from the top corner of the net.
Armstrong then went past Dickie on the left and pulled the ball back for Harvey Elliott, who fired wastefully over.
Armstrong continued to threaten, shooting wide of Dieng's right-hand post after evading three challenges near the edge of the penalty area.
The pressure on Rangers continued after the interval, with Armstrong again drifting away from Dickie before shooting straight at Dieng, who also gathered a long-range effort by Ryan Nyambe.
And having weathered the storm, QPR went ahead when Barbet got the hosts' first goal since the 2-1 home loss to Bristol City on December 1.
Blackburn predictably went straight back on the offensive and Dieng produced another fine save to maintain his team's lead, this time by diving to his right to push away Lewis Holtby's low shot, with Dickie throwing himself in the way of Armstrong's follow-up.
Armstrong's frustration continued when his long-range strike brought yet another save from Dieng, whose performance enhanced his growing reputation.
Rovers piled forward in the closing stages but QPR defended in numbers and held on to take the points.
What the managers said...
QPR's Mark Warburton: "We've had some good performances here and not won. We've been working really hard as a team and the players deserve so much credit for that.
"It's about getting your rewards. We got a scrappy goal - that's no goal of the month contender, that's for sure. But it's an important three points. This division is all about consistency. If you can get some wins you can go from 18th to eighth very quickly. That was a typical Championship game. It wasn't pretty at times."
Blackburn's Tony Mowbray: "It's my prerogative to pick a team the way I want to play. You play strengths against perceived weaknesses. Dickie's a very good footballer but can't run like Armstrong can run. You put speed against no speed and I think we damaged them. We got into some great areas, we just didn't take the chances.
"It's what you do; you wouldn't put your super-fast striker against their fastest defender. You put him where their slowest defender is. If he has to move a little bit to do that, that's what you do. We tried to expose the lack of mobility of both central defenders of QPR. We put our speed and power against them. It didn't work because we didn't score a goal."