Leeds avoided a Carling Cup upset by twice coming back from a goal down to beat West Yorkshire rivals Bradford in a first-round tie at Elland Road.
The League Two side sensed a shock courtesy of a half-time lead given to them by Jack Compton's six-yard finish.
Seconds after the break, Leeds hit back through Ramon Nunez's drive only for Michael Flynn to restore City's lead.
But a header from Ross McCormack restored parity before Nunez tapped in to win it for the Championship side.
The result will be a huge relief to Simon Grayson's side, who were comprehensibly beaten in their opening league match at Southampton on Saturday.
It was far from a fluid home display, with nerves visible to see in some players, but they showed plenty of fight in front of a vociferous crowd and will now be hopeful they can build on this.
Bradford also lost their opening game - 2-1 at home to Aldershot - but this was a far more impressive performance, from which they can take more positives than negatives.
Their two goals were extremely well-fashioned, with Flynn's goal in particular - a neat turn and 18-yard strike into the top-corner - a class above the club's League Two status.
They also demonstrated some neat and incisive football; Compton's opener being a prime example, following a fine run and pull-back from the impressive Mark Stewart.
Ultimately though Leeds' extra power and ability told.
The skillful Nunez went missing during periods of the game, but was there when it counted.
He firstly hauled his side back into the tie with a neat curling finish in the first minute of the second half and then, after McCormack had headed them level a second time, tapped in from close range to see his side through to round two.