French striker Souleymane Doukara struck two high-quality goals as Leeds condemned League Two opponents Accrington to a 2-1 Capital One Cup first-round exit.
But the win was soured when the hosts had Switzerland right-back Gaetano Berardi sent off for a last-minute touchline scuffle.
Leeds needed a lift after their defeat at Millwall on the opening weekend of the Sky Bet Championship season and Doukara, 22, provided it with his opening goal on 20 minutes.
Doukara, on a season-long loan from Italian club Catania, met a cross from Berardi, turned neatly for a big man and shot into the bottom-left corner from 15 yards.
Then, 18 minutes later, young midfielder Lewis Cook threaded the ball through to Doukara, who turned defender Dean Winnard inside out before firing past goalkeeper Luke Simpson from just inside the penalty box.
Leeds dominated for long spells but Accrington staged a late rally and James Gray's 84th-minute shot caused a mix-up between keeper Stuart Taylor and Charlie Taylor and the ball bobbled over the line.
Josh Windass went close in the first half and substitute Rob Atkinson headed only just just over the Leeds bar in the 52nd minute but Accrington left their push much too late.