Kal Naismith came off the bench to score a fine free-kick and secure a deserved victory for Pompey at Grimsby.
The visitors dominated for long periods of the Blundell Park contest, only to be frustrated by the stubborn Mariners.
But, with time running out, Naismith curled a fine shot over the wall and into the net to delight the large travelling army of supporters.
Paul Cook stuck with the same side that were beaten at home by Stevenage a fortnight earlier.
That meant the in-form Michael Smith continued to lead the line, with Conor Chaplin having to be content with a place on the bench.
Ben Davies was denied the opportunity to feature against his former club, with the former Fratton full-back sidelined by a calf problem.
A minute’s silence was held before kick-off in memory of Grimsby legend Paul Futcher – who recently passed away – and the victims of the Chapecoense air disaster.
When the game got started it was the visitors who soon started to dominate, but there were not an abundance of clear-cut chances at either end of the pitch.
Kyle Bennett was looking lively and after he stole possession, it took a vital Josh Gowling interception to stop his pass finding Smith.
The winger then had a chance of his own, firing in a curling effort that James McKeown had to tip over the bar.
Carl Baker whipped the resulting corner into the box from wide on the right, but Matt Clarke was unable to send his header on target.
It was Danny Rose who was next to try his luck on nine minutes, with a 25-yard effort that bent narrowly wide.
There was not much to report at the opposite end, although Omar Bogle did curl a shot over after Grimsby had been awarded a soft free-kick.
It was soon the Blues back on the attack and Baker had a couple of sighters, one of which flew straight into McKeown’s arms, while the second was blazed over.
Enda Stevens then delivered a dangerous low cross into the box that had to be hacked to safety by the hosts.
And Gary Roberts also had a couple of effort just before the break, but the first was blocked and the follow-up trickled wide.
Grimsby Town 0
It was Pompey who were first to threaten following the interval and McKeown did well to keep out Smith’s powerful low drive after Christian Burgess had threaded a pass to the striker.
Stevens then delivered another teasing low cross from the left that flashed invitingly across the face of goal.
But Grimsby almost broke the deadlock with their first decent chance on 54 minutes, with Ashley Chambers’ cushioned volley clawed to safety by David Forde.
Pompey were soon back on the attack, however, and Baker embarked on a fine run into the box, only to see his effort saved by McKeown.
Zak Mills was perhaps fortunate to remain on the pitch when he brought down a rampaging Bennett right on the edge of the box.
But referee Andy Haines decided that a yellow card was appropriate punishment and Bennett curled the resulting free-kick wide.
Cook made a double substitution on 76 minutes, with Conor Chaplin and Naismith brought on for Gary Roberts and Bennett.
There was a nervy moment for McKeown soon after when he dropped Rose’s cross, but Gowling came to his keeper’s rescue by scrambling the ball clear.
But Grimsby were looking more adventurous than before the break and Clarke had deal with the danger following a spot of pinball in the visitors’ box.
Just as a goalless draw was looking the likely outcome, however, Pompey snatched a late winner.
Baker was brought down by Kayden Jackson 25 yards out and NAISMITH stepped up to curl an exquisite free-kick past McKeown’s grasp and into the net.
But there was an immediate scare at the other end when Forde failed to hold Scott Vernon’s ferocious shot, only to react quickly and smother the loose ball.
The Blues stayed strong at the back, however, and saw out five minutes of stoppage-time to secure a valuable victory.
Grimsby (4-2-3-1): McKeown; Mills, Gowling, Collins, Andrew; Comley (Vernon 72), Summerfield; Chambers (Bolarinwa 58), Berrett, Jackson; Bogle
Booked: Gowling, Mills, Berrett
Subs not used: Henderson, Pearson, Boyce, Disley, Venney
Pompey (4-2-3-1): Forde; Evans, Burgess, Clarke, Stevens; Rose, Doyle (c); Baker, Roberts (Naismith 76), Bennett (Chaplin 76); Smith (Hunt 89)
Goals: Naismith 86
Booked: Stevens, Evans
Subs not used: O’Brien, T.Davies, Linganzi, Lalkovic
Referee: Andy Haines
Attendance: 6,560 (1,110 Pompey fans)