NEW YORK (AP) — The Los Angeles Dodgers won their second World Series championship in five seasons, overcoming a five-run deficit with the help of three Yankees defensive miscues and rallying on sacrifice flies from Gavin Lux and Mookie Betts in the eighth inning to beat New York 7-6 in Game 5 on Wednesday night.

Aaron Judge and Jazz Chisholm Jr. hit back-to-back home runs in the first inning, Alex Verdugo's RBI single chased Jack Flaherty in the second and Giancarlo Stanton's third-inning homer against Ryan Brasier built a 5-0 Yankees lead.

But errors by Judge in center and Anthony Volpe at shortstop, combined with pitcher Gerrit Cole failing to cover first on Betts' grounder, helped Los Angeles score five unearned runs in the fifth.

After Stanton’s sixth-inning sacrifice fly put the Yankees back ahead 6-5, the Dodgers loaded the bases against loser Tommy Kahnle in the eighth before the sacrifice flies off Luke Weaver.

Winner Blake Treinen escaped a two-on, one-out jam in the bottom half by retiring Stanton on a flyout and striking out Anthony Rizzo.

Walker Buehler, making his first relief appearance since his rookie season in 2018, pitched a perfect ninth for the save.

Los Angeles Dodgers' Mookie Betts (50) and Freddie Freeman (5) celebrate after scoring against the New York Yankees during the fifth inning in Game 5 of the baseball World Series, Wednesday, Oct. 30, 2024, in New York. (AP Photo/Seth Wenig)

Credit: AP

icon to expand image

Credit: AP

Los Angeles Dodgers' Mookie Betts hits a sacrifice fly against the New York Yankees during the eighth inning in Game 5 of the baseball World Series, Wednesday, Oct. 30, 2024, in New York. (AP Photo/Godofredo A. Vásquez)

Credit: AP

icon to expand image

Credit: AP

Los Angeles Dodgers' Mookie Betts (50) celebrates with manager Dave Roberts after hitting a sacrifice fly against the New York Yankees during the eighth inning in Game 5 of the baseball World Series, Wednesday, Oct. 30, 2024, in New York. (AP Photo/Seth Wenig)

Credit: AP

icon to expand image

Credit: AP

Los Angeles Dodgers pitcher Blake Treinen celebrates the end of the eighth inning in Game 5 of the baseball World Series against the New York Yankees, Wednesday, Oct. 30, 2024, in New York. (AP Photo/Ashley Landis)

Credit: AP

icon to expand image

Credit: AP

New York Yankees starting pitcher Gerrit Cole looks back toward the scoreboard after throwing against the Los Angeles Dodgers during the fifth inning in Game 5 of the baseball World Series, Wednesday, Oct. 30, 2024, in New York. (AP Photo/Godofredo A. Vásquez)

Credit: AP

icon to expand image

Credit: AP

New York Yankees' Aaron Judge catches a fly ball by Los Angeles Dodgers' Freddie Freeman during the fourth inning in Game 5 of the baseball World Series, Wednesday, Oct. 30, 2024, in New York. (AP Photo/Seth Wenig)

Credit: AP

icon to expand image

Credit: AP

New York Yankees center fielder Aaron Judge makes error fielding on a ball hit by Los Angeles Dodgers' Tommy Edman during the fifth inning in Game 5 of the baseball World Series, Wednesday, Oct. 30, 2024, in New York. (AP Photo/Ashley Landis)

Credit: AP

icon to expand image

Credit: AP

Los Angeles Dodgers' Kiké Hernández, right, is safe at third as New York Yankees third baseman Jazz Chisholm Jr. reaches for a throw from shortstop Anthony Volpe during the fifth inning in Game 5 of the baseball World Series, Wednesday, Oct. 30, 2024, in New York. Volpe was charged with a throwing error. (AP Photo/Seth Wenig)

Credit: AP

icon to expand image

Credit: AP