Derby County reached the quarter-finals of the Carling Cup for the first time since 1990, but had to withstand an impressive Leeds United fightback that almost earned the visitors extra-time.
Derby looked to be coasting into the last eight when they took a 2-0 lead through Emanuel Villa and Nathan Ellington, but Leeds hit back with Luciano Becchio replying before the interval.
Leeds dominated and would have taken the tie into extra-time but for a superb one-handed save by Roy Carroll that denied Andy Robinson an equaliser.
Leeds always looked capable of denying Derby, but the Championship side held on in unconvincing fashion to reach the last eight.
Such a scenario looked remote when Paul Jewell's team scored twice in the first 18 minutes.
Leeds' defence was taken apart by some swift passing and movement, with Villa latching on to a flick from Gary Teale in the sixth minute to hold off Lubomir Michalik before bending a left-foot shot into the net.
Leeds hit back and it needed a desperate block by Paul Connolly to keep out a Becchio shot in the 10th minute, but eight minutes later the visitors' defence was split apart again.
Kris Commons played a quick one-two with Przemyslaw Kazmierczak and lifted the ball over Casper Ankergren to leave Ellington with a simple finish into an empty net.
But from then on Leeds took over with Robinson and the impressive Fabian Delph running the midfield.
A goal only looked a matter of time and five minutes before half-time, Frazer Richardson crossed from the right and Becchio placed a header from six yards inside the left-hand post.
Derby made a change at the start of the second half replacing Teale with Ruben Zadkovich, but it was still Leeds who dictated and the home side were left hanging on.
A free-kick from Robert Snodgrass clipped the outside of a post and in the 63rd minute, the midfielder got past Jordan Stewart and crossed low for Robinson to drive in a shot from eight yards which Carroll saved plunging to his right.
Leeds kept pressing, but Derby managed to survive although there was one final anxious moment in stoppage time when Jermaine Beckford almost found the net with a lob from 35 yards that landed on the roof of the net with Carroll desperately back-pedalling.