Pompey climbed to the League One summit with victory at Barnsley, although there were plenty of chewed fingernails by the time the final whistle blew.
It looked like being a comfortable night at Oakwell, with Colby Bishop scoring from the spot and Paddy Lane quickly doubling the advantage.
And Reds fans could have been forgiven for heading for the exits when Connor Ogilvie added a third for the visitors.
But Barry Cotter and Callum Styles both struck in the second half to leave the Blues hanging on for the three points.
John Mousinho made a couple of changes from the side that were held to a draw at Derby at the weekend.
Joe Rafferty and Joe Morrell both returned from suspension, as Zak Swanson and Abu Kamara made way.
It was wet and windy in South Yorkshire, but that did not stop the travelling fans enjoying themselves behind the goal.
And they were given good reason to cheer, with Pompey scoring an incredible three times inside the opening 16 minutes.
They had already gone close twice before the deadlock was broken, as Gavin Whyte’s effort was deflected behind before Bishop nodded a Morrell cross narrowly over.
The Blues took the lead after Lane had broken quickly up the pitch, beating two men on the right and finding Whyte.
He then played the ball into the box towards Bishop, who was crudely felled by opposition keeper Liam Roberts.
Referee Lewis Smith immediately pointed to the spot and BISHOP picked himself up to confidently tuck away the penalty.
The clock showed that goal had arrived on eight minutes and it had not ticked over to nine by the time the advantage was doubled.
Conor Shaughnessy played the ball to Bishop and he deftly turned it into the path of LANE, who raced through and found the top corner with his left foot.
If Barnsley’s defending had got their supporters in mind of pantomime season, the sprinklers going off only served to compound that feeling.
The visitors, meanwhile, were out for blood and Alex Robertson saw his low shot saved following good work from Lane and Bishop.
They soon had a third, though, as Lane’s corner went through to Morrell on the right and the midfielder delivered an excellent cross for OGILVIE to head home.
Pompey were enjoying themselves in possession and the Tykes could not get the ball back off them, much to the frustration of their fans.
The clear-cut chances might have started to dry up, but there was a sense that Mousinho’s men could quite easily have moved up through the gears if required.
Barnsley never really looked like reducing their deficit before the break and when they did win a free-kick in a dangerous area, it was charged down by a committed Morrell.
Half Time: Barnsley 0 Pompey 3
The hosts made a triple substitution at the break, although it was the Blues who were first to threaten following the restart.
Rafferty lifted a fine cross into the area, but Robertson did not make a firm enough connection to send the ball on target.
And Barnsley were soon handed a lifeline as Sam Cosgrove slid a pass across for Cotter in acres of space and he slotted home.
There was another chance for Robertson at the other end, with the midfielder winning a free-kick that he saw saved by Roberts.
It was a much better save from the keeper moments later to keep out Bishop’s header from point-blank range after the striker had been picked out by Rafferty.
But Barnsley then had a chance of their own when a long ball ran straight through to Devante Cole, who could only fire into the side netting.
It was certainly proving to be an open half and Bishop fired narrowly over after good build-up involving Morrell and Whyte.
That was the last piece of action for the latter player, however, as he made way for Kamara on 66 minutes.
And another change followed a few moments later, as Ogilvie required some treatment before being replaced by Jack Sparkes.
Any thoughts of an easy stroll to victory were then ended when Owen Dodgson’s cross was met with a firm header from Styles that Will Norris could not stop from crossing the line.
Mousinho had been preparing a couple of changes before that, with Terry Devlin and Tino Anjorin for Lane and Robertson.
Barnsley poured forward in the closing stages and were buoyed by the display of seven additional minutes, but the Blues saw them out to ensure a happy trip back down to the south coast.
Barnsley (3-1-4-2): Roberts; Williams, Łopata, McCart; Russell (Styles 46); Cotter (O’Keeffe 71), Phillips, Kane, Cadden (Dodgson 46); Cole (Watters 78), McAtee (Cosgrove 46)
Goals: Cotter 49, Styles 77
Subs not used: Killip, Shepherd
Pompey (4-2-3-1): Norris; Rafferty, Poole, Shaughnessy, Ogilvie (Sparkes 68); Morrell, Pack (c); Lane (Devlin 78), Robertson (Anjorin 78), Whyte (Kamara 66); Bishop
Goals: Bishop 8 (pen), Lane 8, Ogilvie 16
Subs not used: Schofield, Towler, Stevenson
Referee: Lewis Smith
Attendance: 11,464 (654 Pompey fans)