In a season where the Davids are booting football's Goliaths out of the Cup with astonishing regularity, all eyes were at Deepdale where Preston were aiming to complete back-to-back Cup victories over Premier League clubs.
Preston - who had beaten Derby in the previous round - dominated the second half and it looked like the south coast side were going to be the latest top-flight club to exit the competition.
In James, however, Pompey have a goalkeeper who is seemingly impenetrable and it is they who progress to the last eight for the first time in four years.
Indeed, this could be Portsmouth's year, as Manchester United and Chelsea are the only sides remaining in the competition who are higher placed than Pompey in the Premier League.
Preston gave the visitors little time to dwell on the ball in an uneasy opening 45 minutes for Portsmouth, even if the home team rarely threatened to score.
Whaley was the home side's most potent attacker, with the winger's trickery and pace posing Glen Johnson problems on the flank.
The 22-year-old should have given the home side the lead in the 22nd minute. His initial shot was blocked by Johnson and then, when just 12 yards from goal, Whaley wildly struck the rebound into the stands.
Darren Carter's dramatic own goal broke Preston hearts
Portsmouth's two best chances came in the latter stages of the half. Andy Lonergan produced an outstanding save in the 37th minute to tip Sulley Muntari's curling free-kick to safety when it was heading into the top-right corner.
And two minutes before the break the profligate Hermann Hreidarsson sliced his shot into the side-netting after a delightful one-two with the impressive Kanu.
Portsmouth began the second half with gusto but they were toothless in attack, and then the tide turned.
Referee Mike Dean awarded the home side a penalty when Sylvain Distin illegally stopped Billy Jones' surging run.
Whaley stepped up to take the spot kick, but James guessed correctly and parried the ball away - however, from there on in Preston had the momentum and the Deepdale crowd sensed an upset.
Chris Sedgwick and Chris Brown both forced the former Liverpool keeper into action minutes after the penalty.
James then produced another world-class save 15 minutes before the end when he acrobatically dived to stop substitute Mellor's effort.
Then, just as a lucrative replay at Fratton Park was looming for the Championship side, Carter bundled Niko Kranjcar's corner into the net.
Before the match, Harry Redknapp said reaching the final would be a dream come true. The Portsmouth boss, who has never won the FA Cup as a manager, is now just two victories from turning his dream into reality.
Preston boss Alan Irvine: "I'm bitterly disappointed. I felt that we deserved to get at least a replay and perhaps should have won the game.
"But David James has made some top class saves and it wasn't to be."
Portsmouth manager Harry Redknapp: "They played ever so well and didn't deserve to lose that game, but that's football.
"We played with an extra man in midfield and we didn't play it through midfield well enough.
"It was a good performance from Preston and if they play like that every week they won't be in a relegation battle."
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.