Pompey started the night in last place in Southern Group B of the Papa John’s Trophy and without a point to their name.
But they ended it by qualifying for the competition’s knockout stages in dramatic fashion on the south coast.
Goals from Miguel Azeez and Gassan Ahadme put the home team in the driving seat against Crystal Palace’s under-21 side.
Meanwhile, AFC Wimbledon were losing 1-0 at Sutton, but still sitting in second place and set to progress.
George Hirst then stepped up to score in stoppage-time and ensure Danny Cowley’s side went through on goals scored.
The Blues boss said: “We played really well and I was pleased for both the youngsters, who acquitted themselves superbly, and the senior player, who supported them brilliantly.
“It was a really positive night at Fratton Park and we knew what we had to do in order to qualify from the group.
“I told the older ones, but not the younger lads because I already knew they’d be nervous and just wanted them to focus on their performance.
“We went through on goals scored in the end – which was all in the plan! Credit to the players because there were some good displays.
“I was really pleased for George because he was excellent leading the line for the whole evening and Nicky asked in the second half whether he’d run over a black cat because he had no luck.
“But eventually the ball fell for him and I always say that it’s an honest game – and the football gods looked after him.
“He said afterwards that it felt like the weight of the world had been lifted from his shoulders. He needed that.
“Some people might say it’s only the Papa John’s Trophy, but I could be playing tiddlywinks against my eight-year-old boy and I’d still want to win.
“I was annoyed on Saturday because I didn’t see the energy and enthusiasm in the second half, but was saw it in this game.
“Winning is a habit and we’re five unbeaten now with three clean sheets, so it’s a step in the right direction.”