Burnley missed out on the chance to reach the last 16 of the Carabao Cup for the first time since 2014 as Leeds triumphed in a penalty shoot-out on a night of high drama at Turf Moor.
Leeds held their nerve to convert all five spot-kicks in the new 'ABBA' format.
And that meant the sole miss by Burnley captain James Tarkowksi proved costly as Leeds goalkeeper Andy Lonergan emerged the hero for the Championship leaders.
A pulsating third-round tie went to a shoot-out after a remarkable finish to normal time as the sides exchanged four goals in 16 minutes – all scored by substitutes and including two in injury time.
Hadi Sacko had put Leeds ahead on the break after 80 minutes before former Leeds striker Chris Wood made it 1-1 from the penalty spot with a minute to go.
A penalty at the other end, slotted home by Pablo Hernandez two minutes into added time looked to have taken Leeds through at the first time of asking.
But Robbie Brady’s stunning free-kick in the 96th-minute extended the drama which concluded with the decisive penalty from Stuart Dallas after extra-time failed to separate the two sides.
Burnley boss Sean Dyche made seven changes to the side that had started Saturday’s 1-1 draw at Liverpool as the Clarets looked to hand the Championship pace-setters only a second defeat of the season.
The first had come at Millwall last weekend as manager Thomas Christiansen saw his unbeaten run in English football come to an end since his summer appointment as the replacement for Garry Monk at Elland Road.
The Danish-born former Spain international retained just two of the players that started at the New Den, with captain Luke Ayling and Conor Shaughnessy forming the centre of the Leeds’ defence.
And the pair were busy in a first half dominated by Burnley without having a goal to show for it.
Leeds’ one effort had seen a tame finish from Jay-Roy Got fail to trouble Clarets’ keeper Nick Pope, who continued in goal following his star showing at Anfield.
In fairness, Leeds keeper Andy Lonergan was hardly over-worked at the other end as his only save of the opening 45 minutes was an early effort to keep out a skidding drive from Scott Arfield.
But Burnley – with full-backs Phil Bardsley and ex-Leeds man Charlie Taylor getting forward at every opportunity – were not short of chances and should have put themselves in the front.
Ashley Barnes and Sam Vokes – starting together up front – both steered efforts wide, while Kevin Long failed to hit the target from a Johann Berg Gudmundsson free-kick.
And Arfield was closest of all to ending the stalemate as he combined well with Vokes but from the striker’s pull-back could not guide his close-range effort inside the far post.
The one-way traffic continued after the break as Burnley continued to push Leeds back, Gudmundsson threatening again with a curling effort that just slid past a post.
Leeds looked to counter by sending on Sacko and the Frenchman did give the Yorkshiremen an extra dimension going forward with his speed on the break.
But their respite was seemingly only temporary as Bardsley was only inches away from scoring his first goal since an effort for Stoke in the same competition 13 months ago with an angled drive that whistled past the post.
Dyche then sent on Brady and Wood in a bid to avoid the prospect of extra-time but after Lonergan had saved from Ashley Westwood, it was the Leeds’ substitutes who combined to give Leeds a shock lead.
With his first touch, Pablo Hernandez released Sacko and the former Bordeaux winger raced in behind Burnley’s defence to rifle a shot beneath Pope and put his side – quarter-finalists last season - within touching distance of the last 16.
But a dramatic finish meant they weren’t there yet as Wood equalised from the spot after Gaetano Berardi had pushed Long over following a Burnley corner, conceded as Lonergan saved well from Gudmundsson.
Incredibly Leeds then went in front with a penalty of their own two minutes into added time when Hernandez converted after James Tarkowski had grabbed a handful of Kemar Roofe’s shirt.
But Burnley still had time to drag themselves off the ropes and finally force extra time in the 96th and last minute thanks to a stroke of genius from Brady, who curled a stunning 25-yard free-kick into the top corner and make it 2-2.
Inevitably the tempo dropped as both sides tried to regain their breath, Leeds opting for the fourth substitution permitted in extra-time to try and keep the Clarets at bay.
But Jack Cork’s fresh legs, having replaced Jeff Hendrick after the Irishman successfully completed 90 minutes on his comeback, kept Burnley driving forward.
And another Brady set-piece almost produced a third Burnley goal four minutes from the end as Wood met his in-swinging delivery with a header which landed on the roof of the net – the nearest either side came to avoiding penalties.
Wood, Ashley Barnes and Brady were then all successful from 12 yards as Burnley briefly got their noses in front in the shoot-out.
But after Tarkowski saw his effort saved, Leeds had two spot-kicks to send Burnley out, Ezgjan Alioski and Dallas converting to make the Clarets’ earlier comeback count for nothing.
Burnley: Pope, Bardsley, Tarkowski, Long, Taylor, Arfield (Brady 72), Westwood (Defour 120), Hendrick (Cork 90), Gudmundsson, Vokes (Wood 72), Barnes. Substitutes: Legzdins, Mee, Lowton.
Booked: Bardsley, Gumundsson, Long.
Leeds: Lonergan, Borthwick-Jackson (Sacko 59), Berardi, Shaughnessy, Ayling, Vieira, Klich, Dallas, Roofe (Alioski 104), Cibicki (Hernandez 79), Grot (Lasogga 85). Substitutes: Wiedwald, Phillips, Gomes.
Booked: Grot, Roofe
Referee: Darren Bond