Burnley made it thirteen league games unbeaten in a six-goal thriller against Birmingham City at St Andrew’s.
The Clarets took the lead three times, but were pinned back on each occasion by a determined Blues side.
Dean Marney scored his third goal in the last seven games to put Burnley in front on the half-hour mark.
Substitute Federico Macheda equalised for the Blues shortly after coming on in the second half before a beautiful header by Michael Duff – his first goal since Boxing Day 2012 – restored the Clarets’ advantage.
However, Manchester City loanee Emyr Huws brought Birmingham back into level terms once again with a controlled strike from outside the box.
Sam Vokes scored what seemed destined to be the winner with three minutes to go, but Macheda came up with the goods one more time in the fourth minute of stoppage time.
Despite the draw, Burnley went back eight points clear in second place in the Championship table.
Ross Wallace was handed his first start since August as Sean Dyche made one change to the team that achieved a historic win over local rivals Blackburn Rovers on Sunday.
Meanwhile, the hosts lined up in a 4-1-4-1 formation.
Burnley dominated from the early stages with Danny Ings particularly threatening on the break thanks to his pace.
On 11 minutes, Kieran Trippier saw his first-time volley fly over the crossbar after a cleverly worked corner by the Clarets.
Chris Burke was pulling the strings for the Blues who applied pressure of their own in the first twenty minutes, but were unable to test Tom Heaton in the Burnley goal.
Midway through the first half, Scott Arfield had a dangerous effort blocked just inside the box following a lovely piece of combination play between Vokes, Ings and the Scot.
The Clarets looked increasingly comfortable, though and they took the lead on 30 minutes.
Birmingham could not deal with a cross to the far post from the right-hand side and Marney – as against Derby eleven days before – found himself in the right place at the right time to tap the ball home from close range.
And Burnley could have doubled their advantage five minutes before the break.
A quick counter-attack saw Ings set up Marney inside the penalty area only for the midfielder’s shot to be blocked amidst some desperate defending by the Blues.
Birmingham began looking for an equaliser shortly after the restart when Lee Novak was not far away from reaching Burke’s ball in across the six-yard box.
However, the Clarets seemed to be in control of the matters.
Vokes headed a near-post out-swinging corner from David Jones wide of the post on 57 minutes.
Lee Clark introduced Macheda into the action on the hour mark and the substitute made an immediate impact.
A Birmingham free-kick from inside their own half was flicked on into the path of the Italian who calmly slotted the ball past Heaton to put the hosts level.
The scoring was from finished at that point, though.
Burnley responded immediately on 67 minutes when Duff rose unmarked at the far post to convert Trippier’s free-kick into the corner of the net.
However, the Blues equalised again just two minutes later.
An initial cross from the left was headed away by the Clarets, but only as far as Huws who controlled the ball and unleashed an unstoppable effort from 25 yards out.
Both teams looked for a winner as Clark brought on NikolaŽigić and Dyche refreshed his side by introducing Junior Stanislas and Ashley Barnes into the action.
And it was the former who seemed to make the game’s deciding move when he ran at the Birmingham defence before crossing the ball low across the six-yard box for Vokes to provide the crucial touch and send the travelling Clarets fans behind the goal into ecstasy.
The Blues could have equalised for the third time almost immediately as first Jonathan Spector’s shot on the turn went wide of the post and then Arfield cleared a header from a corner off the goal line.
Eventually, Birmingham converted their pressure into yet another goal when Macheda’s towering header beat Heaton to deny Burnley their first victory at St Andrew’s since 2007.
Burnley: Heaton – Trippier, Duff, Shackell, Mee – Wallace (Stanislas 62), Marney, Jones, Arfield (Edgar 90+2) – Ings (Barnes 75), Vokes.
Subs: Cisak, Long, Kightly, Treacy.
Birmingham: Randolph – Spector, Packwood, Robinson, Blackett – Huws, Lee (Macheda 60), Adeyemi – Burke, Novak, Shinnie (Žigić 79).
Subs: Doyle, Martin, Caddis, Rusnák, Ibe.
Goals: Macheda 63, 90+4, Huws 69 – Marney 30, Duff 67, Vokes 86
Referee: Mr James Linington
Att: 16,695 (1,593)