Andre Green’s 90th-minute strike earned Pompey a 1-0 victory at Rochdale and a spot in the FA Cup third round.
The substitute’s heavily-deflected shot earned the Blues a 1-0 win in the second round at Spotland.
Kenny Jackett’s troops were well below there best but booked their place in tomorrow night’s draw.
Pompey created the first chance of the game in the sixth minute when Oli Hawkins’ deflected shot was gathered by home keeper Josh Lillis.
Rochdale almost opened the scoring five minutes later when a long ball found its way to Jordan Williams, but his shot on the swivel missed the target.
Ben Thompson was lively for the Blues and in the 15th minute he wriggled his way into the area before crashing a shot wide, while Gareth Evans fired a crisp volley over on 27 minutes.
Jackett’s troops were given a scare in the 42nd minute. Another pound forward made it to Jordan Williams but his angled right-foot shot went the wrong side of the far post.
Pompey went agonisingly close to taking a lead into half-time when Ronan Curtis cracked a 20-yard shot, but his effort cannoned off the crossbar.
Rochdale started much the better side in the second half and a superb save from Craig MacGillivray in the 63rd minute kept the game a stalemate.
Ian Henderson slipped in Calvin Andrew, but the onrushing Pompey keeper’s feet thwarted the striker’s shot.
Six minutes later it was Ketih Hill’s side’s turn to hit the woodwork when Matthew Done broke into the area but his left-foot shot crashed against the angle of the goal.
To their credit, the Blues responded well, with Oli Hawkins heading Curtis’ cross into the arms of Lillis in the 70th minute.
And on 71 minutes Jack Whatmough found himself in acres of space but could only steer Lee Brown’s free-kick wide with the goal at his mercy.
Both teams were pushing for a winner, with Henderson flashing a right-foot volley from the edge of the box over the bar in the 78th minute.
The visitors were given a glorious opportunity to snatch a winner at the death – and snatched it with both hands.
Green was fouled by Ryan Delaney on the edge of the box in the 90th minute. Brown worked the set-piece to the Aston Villa loanee 20 yards from goal and his right-foot effort took a significant deflection before looping past Lillis.
Yet Rochdale came agonisingly close to forcing a Fratton Park replay in stoppage-time, but Henderson’s shot was superbly saved by MacGillivray to his left.
Although they weren’t at their peak, Pompey ground out a victory and give themselves a chance to clinch a money-spinning third-round tie in tomorrow night’s draw.