The win was their second in the row after the victory over Hull City in the previous match – the first time they have managed to do so this season.
Harrison Burrows initially equalised for Peterborough United on the hour mark, before Siriki Dembele caused the stadium to erupt with an injury-time winner.
The victory means Posh remain in 20th place in the Championship, however they extend the gap between themselves and the relegation zone to five points.
Darren Ferguson’s side will travel to Wales next weekend to take on Swansea City and former Posh defender Russell Martin.
The Swans currently sit in 16th – three points ahead.
Here are the best of today’s Championship rumours...
1. Lincoln City could revisit pursuit of Swansea City star
Lincoln City could reportedly look to secure a deal for Swansea City's Morgan Whittaker in January after a deal collapsed in the summer window. Jez George, the club's director of football, revealed the Imps would "love" to sort January deals for one or two of the players they missed out on in the summer. (The 72)
Photo: Alex Burstow
2. West Brom boss keen on January reunion with ex-Barnsley striker
West Brom boss Valerien Ismael could pursue a reunion with his former Barnsley forward Daryl Dike in the January window. The Orlando City man scored nine goals in 19 appearances for the Tykes during his loan spell in Yorkshire last season. (Birmingham Mail)
Photo: Alex Livesey
3. Middlesbrough consider swoop for Brazilian defender
Middlesbrough are reportedly interested in signing Brazilian right-back Heitor Rodrigues. Neil Warnock's side are set to bid just over £5 million but his current club Internacional are not willing to accept less than £10 million for the 20-year-old. (Football League World)
Photo: Silvio Avila
4. Borussia Dortmund considering move for another Birmingham City star
Borussia Dortmund are keen on Jude Bellingham's brother Jobe, who also plays for Birmingham City. The 16-year-old has featured for the Blues' U23 side this season. (Football League World)
Photo: Martin Rose