Josh Brownhill’s 94th-minute winner after Jeremy Sarmiento’s wonder goal gave Burnley a dramatic Championship victory against winless Portsmouth.
The Clarets had laboured to break down a well-organised and determined Pompey, who seemed set to stretch their unbeaten away run to 13 league games.
Callum Lang gave Portsmouth a first-half lead after Connor Ogilvie had hit the post for last season's League One champions.
The arrival of Ecuador winger Sarmiento changed the dynamic and within two minutes he had curled in a lovely leveller, with Brownhill drilling in his third goal of the campaign in the fourth minute of added time.
This was the first meeting of these two clubs for 12 years, but Pompey have been a Burnley bogey side down the years, the Clarets winning just two of their previous 14 meetings.
That trend seemed to be continuing as Portsmouth looked solid at the back and dangerous when they ventured forward in the first half at Turf Moor.
Ogilvie glanced Marlon Pack’s corner against the far post and - where Burnley did use their dominant possession to fashion a chance - they found centre-back Regan Poole, making his first start for 10 months after injury, impassable.
Three minutes before the break Pompey attacked with a sweeping move from right to left as Josh Murphy fed Paddy Lane and he delivered a perfect low cross to the far post for Lang to score his third goal of the season.
Burnley’s win at Leeds last week had been their first in four games but they looked like going down to a rare home defeat as Portsmouth defended their lead stoically in the second half.
The Clarets were lacking inspiration but found it in the shape of Sarmiento, sent on with 15 minutes remaining as Scott Parker looked to change things.
The Brighton loanee did exactly that, carving in from the left and then curling a gorgeous shot into the far corner for his second goal of the season. The other was for the Seagulls in the EFL Cup before he made the loan move to Lancashire.
Burnley had shown more urgency in the second half and they got their reward when another attack ended with Brownhill drilling home the winner in a crowded penalty area.
Burnley manager Scott Parker told BBC Radio Lancashire:
“We found a way to win. In the first half we fell a little bit short of where we want to be, in many aspects, and I addressed some things at half-time.
“For the second half we were every bit what we needed to be, at 1-0 down against a very well-organised team. This team (Portsmouth) has got results at some very big places.
“I'd like to take full credit and say I told Jeremy (Sarmiento) to go on and score with his first or second touch but I’d be lying if I said that.
“What I will say is that every one of the subs made an impact. Jeremy stands out because of the goal but Flemming, Jay Rodriguez, Josh Laurent all came into the game prepared and ready to go.”
Portsmouth head coach John Mousinho told BBC Radio Solent:
“I didn’t think Burnley were better than us, and they’re a good side. We thoroughly deserved to get at least get a point out of that and it’s brutal because you get punished in those moments.
“We need to be a lot better because we competed for 96 minutes.
“We frustrated the fans here, Burnley couldn’t break us down, it wasn’t sustained waves of pressure but we let ourselves down in two moments, one where we've not got up to the ball and the other where we’ve not cleared the danger.
(On refereeing) “Every week we seem to get hurried up and it doesn’t seem to happen to other sides - when you look at Burnley’s goal kicks and throw-ins they get a lot of time.
“And then there was a disgraceful challenge from (Zian) Flemming on Jordan Williams, he put him into the stand and Jordan got booked off the back of it.”