Pompey were left cursing a controversial red card for Jack Whatmough as they were narrowly beaten by Lincoln at Fratton Park.
The defender was sent off for a challenge on Jorge Grant in the first half, despite appearing to win the ball cleanly.
It looked like the Blues would still hold on for a point, but Morgan Rogers came off the bench to grab a late winner for the visitors.
Kenny Jackett – in his 200th game in charge of Pompey – kept faith with the same side that were beaten by Hull at the weekend.
It meant that new signings George Byers and Charlie Daniels had to be content with a place among the substitutes.
The game started at an electric pace and a threaded Grant pass was just too heavy for Anthony Scully to get a vital touch on.
Ronan Curtis tried to get on the end of a teasing Callum Johnson’s delivery at the other end, but TJ Eyoma nodded clear.
Both sides were looking to launch quick attacks, although neither keeper was being particularly troubled by the end product.
That was until Craig MacGillivray had to get down to make a smart stop to deny Anthony Scully midway through the first half.
But the big talking point arrived on 29 minutes when Whatmough made a firm challenge on Grant and yet emerged with the ball.
The defender was miffed that referee Sam Purkiss blew for a foul and his look changed to one of incredulity when a red card was brandished.
Lincoln almost took immediate advantage when the free-kick was lofted forward and Conor McGrandles’ header had to be parried away by MacGillivray.
Skipper Tom Naylor had dropped back alongside Sean Raggett in defence, as Pompey fielded a 4-4-1 system.
It was, unsurprisingly, the visitors who finished the half on top and Pompey were fortunate to see McGrandles’ goal-bound header ricochet off Lee Brown’s leg and loop over.
And Tayo Edun was then inches away from breaking the deadlock just before the break, courtesy of a fizzing effort that rattled the crossbar.
Half Time: Pompey 0 Lincoln 0
Marcus Harness was the man sacrificed to shore up the back-line after the break, as Rasmus Nicolaisen replaced him.
Purkiss continued to frustrate the home side when Scully clearly tugged down Johnson and, this time, kept his cards in his pocket.
Pompey were being forced back, as their opponents tried to find a breakthrough, but were making sure to get their bodies in between the ball and their goal.
Alex Palmer then dwelled far too long with the ball at his feet at the other end, with a sliding Curtis not quite able to make him pay.
But the keeper did better just past the hour mark to get a hand on Williams’ cross, taking the ball away from the waiting John Marquis and Curtis.
The hosts felt that a Curtis free-kick was blocked by the hand of Eyoma on 67 minutes, but their appeals were ignored by Purkiss.
MacGillivray was being well protected, but had to beat away an effort from McGrandles, with Nicolaisen hooking the loose ball over his own bar.
Marquis had worked hard up front without much reward and was replaced by the fresh legs of Ellis Harrison.
There were then penalty appeals at the other end when Rogers felt he was tripped by Nicolaisen, but again the referee was unmoved.
Williams was given a rest following his tireless display, as Michael Jacobs entered the fray on 76 minutes.
But the Blues’ resolve was finally broken on 79 minutes when McGrandles teed-up Rogers to slot the ball home.
Jackett immediately threw on Daniels and Byers for their debuts and the former almost set-up an equaliser.
He swung in a fine corner that was met by the head of Curtis, although a defender was able to head from the line.
Pompey tried their best to get men forward and find a last gap leveller, but the Imps held on to secure top spot in League One.
Pompey (4-4-1-1): MacGillivray; Johnson, Whatmough, Raggett, Brown (Daniels 81); Harness (Nicolaisen 46), Naylor (c), Cannon (Byers 81), Curtis; Williams (Jacobs 76); Marquis (Harrison 70)
Sent off: Whatmough
Booked: Harness, Raggett
Subs not used: Turnbull, White
Lincoln (4-1-4-1): Palmer; Eyoma, Jackson, Walsh, Edun (Melbourne 86); Bridcutt (c); Scully (Rogers 70), McGrandles, Grant, Johnson (Anderson 89); Hopper
Goals: Rogers 79
Booked: Edun, Jackson, McGrandles
Subs not used: Long, Montsma, Jones, Howarth
Referee: Sam Purkiss