QPR had opened the scoring straight from a corner
Siriki Dembele snatched an injury-time winner as Peterborough registered back-to-back victories for the first time this season.
Ilias Chair put QPR ahead directly from a corner early in the second half, only for teenager Harrison Burrows to score Posh's equaliser.
The home side created the better chances and finally gained their reward a minute into added time when Dembele squeezed his finish past Seny Dieng.
It was Rangers' fourth consecutive away defeat and nudged them out of the top six, while Peterborough remain in 20th place.
Fresh from their first away success of the season against Hull, Peterborough began brightly and found the net in a goalmouth scramble, but Mark Beevers' effort was ruled out for an infringement by Sammie Szmodics.
Szmodics volleyed a chance over the bar later during a scrappy, scoreless first half, while Posh team-mate Jorge Grant's attempt from distance whistled into the side netting.
The home side also threatened just after the restart, with Dieng pouncing to foil Dembele - but that prompted a QPR counter-attack and they won a corner, which Chair swept inside the far post to open the scoring.
However, Posh substitute Idris Kanu began the move that quickly drew his side level, picking out Szmodics and, although the midfielder miscued his shot, Burrows drove the loose ball into the net.
Although Lyndon Dykes went close for QPR, it was Posh who continued to threaten more regularly and Kanu fired wide before Dieng thwarted Jack Taylor, with Dembele putting the rebound over.
But the 25-year-old - who had also scored Posh's winner against Hull in midweek - made amends as he latched onto Oliver Norburn's pass and steered his shot beyond Dieng.
- Line-upsMatch StatsLive Text
Line-upsPeterborough
Formation 3-4-3
13Cornell4Thompson2Edwards5Beevers23Ward18Norburn8Taylor16Burrows11Grant10Dembélé7Szmodics
- 13Cornell4Thompson2Edwards5Beevers23WardSubstituted forKanuat 54'minutes18Norburn8TaylorSubstituted forButlerat 89'minutes16Burrows11GrantSubstituted forCoventryat 67'minutes10Dembélé7Szmodics
Substitutes
- 3Butler6Kent12Knight19Kanu20Coventry21Tomlinson28Blackmore
QPR
Formation 3-4-1-2
1Dieng4Dickie20Dunne6Barbet37Adomah12Ball7Johansen16McCallum10Chair9Dykes11Austin
- 1Dieng4Dickie20Dunne6Barbet37Adomah12BallSubstituted forAmosat 59'minutes7Johansen16McCallumSubstituted forWillockat 82'minutes10Chair9Dykes11AustinSubstituted forGrayat 67'minutes
Substitutes
- 2Kakay5de Wijs8Amos13Archer17Dozzell19Gray21Willock
Referee:Jarred GillettAttendance:12,035Match StatsHome TeamPeterboroughAway TeamQPRPossessionHome42%Away58%ShotsHome12Away13Shots on TargetHome5Away6CornersHome1Away4FoulsHome7Away11Live TextPost update
Match ends, Peterborough United 2, Queens Park Rangers 1.
90'+9'Full Time
Second Half ends, Peterborough United 2, Queens Park Rangers 1.
90'+8'Post update
Foul by Robert Dickie (Queens Park Rangers).
90'+8'Post update
Siriki Dembélé (Peterborough United) wins a free kick on the left wing.
90'+7'Post update
Attempt missed. Stefan Johansen (Queens Park Rangers) left footed shot from the right side of the box misses to the right. Assisted by Lyndon Dykes.
90'+1'goalGoal!
Goal! Peterborough United 2, Queens Park Rangers 1. Siriki Dembélé (Peterborough United) right footed shot from the centre of the box to the bottom left corner. Assisted by Oliver Norburn following a fast break.
89'Substitution
Substitution, Peterborough United. Dan Butler replaces Jack Taylor.
87'Post update
Robert Dickie (Queens Park Rangers) wins a free kick in the defensive half.
87'Post update
Foul by Sammie Szmodics (Peterborough United).
86'Post update
Foul by Lyndon Dykes (Queens Park Rangers).
86'Post update
Oliver Norburn (Peterborough United) wins a free kick in the defensive half.
86'Post update
Luke Amos (Queens Park Rangers) wins a free kick in the attacking half.
86'Post update
Foul by Conor Coventry (Peterborough United).
84'Post update
Attempt missed. Jack Taylor (Peterborough United) left footed shot from outside the box is high and wide to the left. Assisted by Sammie Szmodics.
83'Post update
Foul by Chris Willock (Queens Park Rangers).
83'Post update
Nathan Thompson (Peterborough United) wins a free kick in the defensive half.
82'Substitution
Substitution, Queens Park Rangers. Chris Willock replaces Sam McCallum.
81'Post update
Attempt missed. Siriki Dembélé (Peterborough United) right footed shot from the centre of the box is just a bit too high.
80'Post update
Attempt saved. Jack Taylor (Peterborough United) right footed shot from outside the box is saved in the bottom right corner.
79'Post update
Attempt blocked. Stefan Johansen (Queens Park Rangers) left footed shot from the centre of the box is blocked. Assisted by Luke Amos.
Page 1 of 5rewindpreviousNavigate to the next pagenextNavigate to the last pageforward
Source: bbc.com