Pompey’s run towards the League One play-offs stalled after a 2-1 loss at Peterborough.
Jack Marriott’s finish and an own goal from Matt Clarke made the difference after back-to-back league wins for the Blues.
Sub Conor Chaplin’s finish 12 minutes from the end raised hopes of a late charge, but Kenny Jackett’s men couldn’t find the leveller.
The first half was low on quality with Pompey getting into dangerous areas but lacking accuracy with their final ball.
The visitors had a let off in the 17th minute when the lively Gwion Edwards lifted his shot on to the bar as Luke McGee advanced.
McGee saved sharply 11 minutes later as Marriott shot from inside the box as Pompey were undone on the counter.
Main had the Blues’ best first-half chance as he fired off the post 13 minutes before the break.
Naismith went close to the opener 10 minutes after the restart, as his 20 yarder was turned around the post by Conor O’Malley.
The opener arrived three minutes later as Marriott slid in the ball from a pinpoint Maddison cross.
The home side looked to have settled it with 20 minutes left, as Christian Burgess’ foul on Maddison was punished with the Peterborough man’s free-kick going in off Clarke’s head.
But Chaplin gave Pompey hope with 12 minutes left, as he was on hand to tap in when O’Malley parried Danny Rose’s shot.
Oli Hawkins was thrown up front as the visitors pushed for the second goal, but the home side held out for the three points.