The Blues had found themselves behind to Ricky-Jade Jones’ 20-minute opener and struggling to find a foothold.
Yet two home goals in five minutes turned the game on its head and laid the platform for a classy 3-1 triumph over Darren Ferguson’s men.
Firstly Colby Bishop headed home Marlon Pack’s cross and then Abu Kamara bagged his first for the club two minutes before the break.
Regan Poole made sure of a fully-deserved victory on 59 minutes, sliding in Kamara’s left-wing cross in front of the Fratton End.
Certainly the scoreline didn’t flatter the Blues, who turned in an outstanding second-half display, despite being reduced to 10 men following Joe Morrell’s 85th-minute red card.
Following successive League One draws, it was a welcome result heading into the international window, leaving them fifth in the table.
Peterborough drew the first save of the match on five minutes when Regan Poole’s clearance was cut out and Ricky Jade-Jones surged into the box.
He then squeezed in a shot from a tight angle which was pushed around the post by Will Norris, conceding the game’s first corner.
The deadlock was broken on 20 minutes when Jade-Jones got the better of Swanson inside the box.
The attacker cleverly managed to wrong-foot the right-back, creating enough room to curl a right-footed shot into the far corner to make it 1-0 to the Posh.
Moments later, Jade-Jones popped up at the far post, where Swanson was outnumbered, and met a cross with a shot fired narrowly wide.
Pompey responded by Bishop meeting Morrell’s right-wing cross with a flying header which shot narrowly past the post, although the striker was adamant he’d been fouled in the process.
However, on 38 minutes, Bishop did level with a header.
Pack delivered a wonderful ball in from the right and there was Pompey’s centre-forward flying in head home among a ruck of players in the six-yard box.
Within five minutes the Blues had themselves the lead, with Pack once more involved in the moment.
His short corner was played to Whyte, whose first-time cross wasn’t the greatest, yet somehow it was missed by Romoney Crichlow and found its way to Kamara at the far post.
The loanee had time to calmly stroke a right-footed finish from close range and Pompey were 2-1 up.
With no changes at the break, Pompey struck the bar on 51 minutes when Swanson clipped in a cross which was headed by Morrell and then sent against his own crossbar by Hector Kyprianou.
With the ball still in play, Saydee curled in a right-footed shot which was brilliantly clawed past the far post by Nicholas Bilokapic.
Moments later, Bishop squared a pass to Kamara, whose fierce left-footed shot was superbly stopped by the keeper.
On 59 minutes it was 3-1 when Kamara fired in a shot-cum-cross from the left and there was Poole sliding in at the far post to finish in front of a jubilant Fratton End.
Morrell was sent off for a second bookable offence in the 85th minute, but Pompey held firm to record an important win.