Leeds United moved into the third round of the Carabao Cup by winning a Yorkshire derby against League One side Barnsley at a packed Elland Road.
The hosts looked in control when Luis Sinisterra scored from 25 yards and Mateusz Klich converted a penalty.
But Barnsley pulled one back through Mads Andersen's diving header and then missed a spot-kick of their own as Callum Styles could only hit the post.
Klich scored again with a curling shot from 15 yards to seal Leeds' win.
Jesse Marsch's team have been drawn away to fellow Premier League side Wolves in the next round with the tie to be played in the week commencing 7 November.
Leeds made nine changes to their starting line-up from the 11 that began the 3-0 home win over Chelsea on Sunday (Meslier and Llorente keeping their places) although they still took the lead after 20 minutes.
Colombia winger Sinisterra, making his first start for the club since a £21m summer move from Feyenoord, opened his account in style with a brilliantly-struck effort from outside the penalty area.
Klich doubled Leeds' advantage 12 minutes later by scoring the penalty after the impressive Sinisterra had been fouled by Barnsley's Conor McCarthy.
However, the Tykes, 16th in League One and who had won 1-0 away from home at Championship Middlesbrough in the first round, fought back.
Andersen produced a low diving header when unmarked following Josh Benson's free-kick and the visitors had a chance to level when Styles was fouled by Adam Forshaw but Styles missed the resulting penalty.
However, the home side restored their two-goal advantage in the 57th minute as Sinisterra's cross was not cleared and Klich curled the ball past goalkeeper Jack Walton.
UNITED: (4-2-3-1) Meslier 6.5; Drameh 6.5, Llorente 6 (Koch 45, 6.5), Cooper 6 (Struijk 45, 6.5), Hjelde 5.5; Forshaw 6.5, Greenwood 7 (James 75, 6); Summerville 7.5, Klich 7.5, SINISTERRA 8 (Roca 62, 6.5); Gelhardt 7 (Rodrigo 75, 6)
Subs not used: Robles (GK); Aaronson, Harrison, Kristensen
Goals: Sinisterra (21), Klich (32 PEN, 57)
Bookings: Drameh (67), Hjelde (68)
Referee: John Brooks (Leicestershire) 7
Man of the Match: Luis Sinisterra (Leeds United)
Venue: Elland Road