Ryan Fraser’s fortunate late goal forced Ipswich Town a fortunate FA Cup third round replay against League Two side Portsmouth this afternoon.

The substitute’s free-kick from out on the left touchline evaded everyone to drop into the net in the 88th minute, Luke Chambers having challenged ex-Blues keeper Brian Murphy in the six-yard box.

It was tough luck on Pompey, who looked full value to progress after teenage sub Conor Chaplin rifled home a low shot with just four minutes to go.

Tommy Oar rammed home a rebound to give Town the lead against the run of play in the 53rd minute, but Portsmouth hit back less than two minutes later through Kyle Bennett’s classy side-footed finish.

The visitors had utterly dominated possession in a goalless first half and looked by far the better team for long periods.

Mick McCarthy made seven changes to the team which drew 0-0 at Burnley the week previous and his fringe players produced a disjointed display.

Take nothing away from Paul Cook’s men though. They refused to deviate from their usual attack-minded passing game and it should not be forgotten that they had three defenders unavailable, while their midfield skipper was rested and their first-choice striker was ineligible.

Home fans had greeted the half-time whistle with resounding boos.

It was Portsmouth who looked like the Championship side in the opening period with the remarkable statistic that they had enjoyed 74% of possession telling the tale.

The high-flying League Two team, so used to opposition parking the bus at Fratton Park, appeared to relish the opportunity to go toe-to-toe with a team 46 places above them in the Football League pyramid.

Ipswich produced just one shot on goal in the entire opening 45 minutes and that was a tame long-range attempt by Luke Varney.

Portsmouth’s travelling army of almost 2,500 fans greeted their team’s string of passes with ‘oles’ but the visitors couldn’t turn their dominance into a goal.

Barnsley loanee Paul Digby looked all at sea on his Town debut and was quickly moved from centre-back to right-back. He did, however, get himself out of jail with a couple of last-ditch blocks.

Bartosz Bialkowski, arguably Town’s best player, made smart stops from Marc McNulty and Bennett, while McNulty fluffed a shot after a fine one-two with former Blues midfielder Gary Roberts sliced open the home defence.

No Town player had covered themselves in glory, but Brett Pitman and Ainsley Maitland-Niles were particularly below-par.

It was Ipswich who broke the deadlock eight minutes after the restart though after a rare attack. Varney – one of the few who looked up for it – showed good strength to gain possession of a long ball, his smart pass found Pitman and, after keeper Murphy saved with his legs, Oar rammed home the rebound.

Ipswich switched off though and were pegged back just 95 seconds later. Roberts twisted and turned on the edge of the box, he passed left to McNulty, he in turn passed left again and Bennett produced a sublime, first-time side-footed finish across Bialkowski and into the bottom corner.

McCarthy responded by bringing on Ryan Fraser for the lacklustre Maitland-Niles but it did little to turn the tide.

Portsmouth continued to attack and Bennett’s slick one-two with Roberts ended with a clipped cross being deflected behind.

Keen not to lose the game, McCarthy’s next change was bringing on experienced defender Tommy Smith for Digby.

Moments later, Bialkowski had to be alert again to make a fine near post stop from McNulty after yet more good work by Bennett.

Then came a moment which rather summed up Ipswich’s day. Fraser took a short corner to Jonas Knudsen, got the ball back and the offside flag was raised.

The introduction of Freddie Sears for Varney finally gave the Blues some much-needed impetus and both sides went for it in the closing stages.

Town forced a corner in the 83rd minute following Fraser’s driving run and shot. From the resultant corner, Pitman’s flick-on was met by the head of Piotr Malarczyk and blocked by a defender. Big shouts for handball were waved away by the referee. Not long afterwards, Sears had a shot blocked.

It was Portsmouth who got their noses in front in the 86th minute when 18-year-old Chaplin, out of nowhere, worked himself half a yard of room on the edge of the box and rifled home a fine low finish into the bottom corner.

Once again there was a quickfire response though, this time a two-and-a-half minute gap between the goals, with Ipswich levelling things thanks to a stroke of luck.

Fraser’s crossed free-kick from the left touchline somehow evaded everyone and dropped into the net after Chambers had done enough to put off keeper Murphy inside the six-yard box.

Town had got out of jail.

IPSWICH TOWN (4-4-2): Bialkowski; Chambers (cpt), Malarczyk, Digby (Smith 63), Knudsen; Maitland-Niles (Fraser 58), Skuse, Hyam, Oar, Varney (Sears 74), Pitman.

Unused subs: Gerken, Kenlock, Tabb, Bru.

Booked: Skuse (45)

PORTSMOUTH (4-2-3-1): Murphy; Davies, Webster, Barton, Stevens; Hollands (Haunstrup 81), Close (May 74); Roberts (cpt) (Chaplin 77), McNulty, Bennett; McGurk.

Unused subs: Bass, Boco, Tollitt, Evans.

Booked: Barton (90)

Attendance: 17,020 (2,494 away)

Referee: David Coote.