There were five minutes remaining and it looked like penalties would be required to decide who reached the Checkatrade Trophy semi-finals.
But when Gareth Evans swung a corner into the Peterborough box, David Wheeler was there to slam the ball home with a fine finish.
The on-loan QPR winger was one of the more experienced heads in a youthful side that included three teenagers.
And he believes the Blues’ progress to the last four shows what a talented squad Kenny Jackett has at his disposal.
Wheeler said: “It was a proper slog of the match and Peterborough put out a team that was close to being their strongest.
“We rested a lot of the players who are involved week in, week out in the league and that’s something they need.
"I had some chances and so was really chuffed to score the winner – it was the icing on the cake for me really."
“But it just goes to show how strong this squad is that we can make changes and perform so well to get the result.
“I had some chances and so was really chuffed to score the winner – it was the icing on the cake for me really.
“It’s always good to bounce back after a couple of defeats and you don’t want those runs to keep going. It was nice to get a positive result.
“This competition is quite a gruelling thing to have chucked in among the other fixtures, but towards the end it becomes something you can get excited about.”
Pompey will now have to see off either Bristol Rovers, Bury or Sunderland to reach the final at the end of the March.
Wheeler said: “I’ve had some great personal experiences at Wembley and know some of the other lads have been there.
“It’s always a really great occasion to be a part of. I was on the losing side the last time I was there, but it’s still something you’ll never forget.”