Portsmouth came from behind at Loftus Road to secure their first Championship win of the season and send Marti Cifuentes' QPR side bottom of the table.
Pompey remain a place above QPR in 23rd but are now level on points with both Cardiff City and Coventry above them.
Karamoko Dembele scored his first goal for the Hoops to open the scoring in the first half before Portsmouth midfielder Freddie Potts also netted his first goal for the club to level things before the break.
John Mousinho’s side then took the lead from the penalty spot in the second half through Callum Lang and held on for an opening win of the campaign in their 10th attempt.
It is also Portsmouth's first win away at QPR in 12 matches, securing three points there for the first time since 1961.
QPR have now lost four straight league games and not won since the end of August.
They took the lead inside 10 minutes when Dembele capitalised on a poor headed clearance by Pompey keeper Nicolas Schmid.
The weak header fell to Dembele who side footed the ball over everyone and into an empty net from distance.
It did not take long though for the visiting side to get back on level terms, as 21-year-old midfielder Potts found the net.
Defender Jordan Williams found Lang down the right, who pulled it back to Potts who ran onto the ball and fired it low into the goal through a host of defenders.
Ilias Chair then had a big chance put the hosts back in front as he got through one-on-one with Schmid, but the Pompey keeper stood tall and denied his chipped effort.
Early in the second half it was Portsmouth who took the lead as Lang was fouled in the area and then took the spot kick, stroking the ball into the bottom left-hand corner.
QPR pushed for a leveller in the closing minutes but were unable to find a way through a determined defence who have conceded the most goals in the division.
QPR head coach Marti Cifuentes told BBC Radio London:
"I've been doing this job for 20 years and have been through some difficult situations but this is not the most difficult.
"We spoke in the summer that it could take some time and today is a good example.
"We started well, scored early and had more chances but then we concede and we lost momentum in the second half.
"This is not a time to panic."
Portsmouth boss John Mousinho told BBC Radio Solent:
"The win was the most important thing because the pressure was obviously building with the way the league table is.
"We've probably missed Callum Lang over the last couple of weeks because of his work rate and that showed with the first goal where he chases the ball down and shows his quality after that (a cross for Freddie Potts to score).
"Then he shows calmness and composure to score the penalty.
"The belief should've been building - which is difficult when you haven't won in nine games - but it should've been building and hopefully it gives us a lot of confidence going into the next few games."