AT one stage it looked as though Burnley would be dropping in to the Championship drop zone.
But three goals in the final 12 minutes at the KC Stadium set up a sensational victory for the Clarets.
Trailing 2-0 courtesy of Matty Fryatt's double for Hull City, defender David Edgar scored his first goals for the club to level proceedings before Jay Rodriguez grabbed the winner in stoppage time.
It started well for Eddie Howe's side in East Yorkshire with the inter-changing forward four of Keith Treacy, Ross Wallace, Junior Stanislas and Rodriguez switching roles to cause the Tigers defensive line a major headache.
And all four were involved as the ball switched from full-back Ben Mee, who replaced Brian Easton in Howe's starting XI, over to Stanislas on the opposite angle of the penalty area. However, the former Hammer lost his footing as he looked to pull the trigger.
Stanislas was involved again moments later when skipper Chris McCann fed the ball in to his feet and he beat Joe Dudgeon for pace, though he blazed his effort over the bar with just Peter Gulacsi to beat.
But the Clarets wouldn't threaten again as the hosts, who welcomed Nicky Barmby as caretaker boss for the first time at home, played as though they were on the training ground.
The Clarets refused to press the ball, applying little pressure on their opponents what-so-ever as they enjoyed ample possession. And when the visitors did have the luxury of possession it was more often than not conceded with wasteful, overhit passes.
The breakthrough came in the 11th minute when Cameron Stewart, returning to action following a lengthy absence with a cruciate knee ligament injury, glided past Keiran Trippier before firing the ball across goal for Fryatt to score from close range.
Tricky Robbie Brady whipped in a dangerous free-kick as time ticked away in the first half but Fryatt inexplicably backed out of the header. Then in stoppage time the winger cut back past Mee before lashing a low, left-footed shot at goal which Lee Grant palmed clear.
The Clarets responded in the second half, with Sam Vokes replacing Stanislas, and it was the substitute who flicked the ball on for strike partner Rodriguez inside the area but his half-volley on the turn cannoned back off the angle.
Disaster struck soon after when Fryatt was allowed to force an entry in to the area and his right-footed shot beat Grant, though the Clarets stopper should have done better.
That goal seemingly sparked the away side in to life and Wallace went close on two occasions, bending efforts around the far post from the angle of the area. Robert Koren went close midway through the second half but Grant stood tall to deny his deft flick.
Then came the frenzied finale. Trippier's knock to Wallace was swung in to the area and Edgar was on hand to guide the ball back across goal and in to the corner. And four minutes later Burnley were level; Edgar again the unlikely hero. This time the defender lifted the ball in to the roof of the net with a falling volley following Vokes's flick on from Trippier's throw.
From that point there was only going to be one winner. The Clarets pushed forward with belief, encouraged from the dug out and the vociferous travelling support. Treacy was denied on two occasions, firstly from a stinging right-footed drive which Gulacsi did incredibly well to tip around the post, then the keeper forced his looping cross over the bar.
But the comeback was sugar-coated in sublime fashion in the final minute of time added on. Rodriguez latched on to skipper Chris McCann's clip and fired low from 20-yards in to the far corner to sent the players, management team, and fans alike in to raptures.
It could have been so much different with Bristol City beating league leader's Southampton, but that's football and the outcome can only benefit the Clarets who climb to 16th in the table.