KANSAS CITY, Mo. >> Giancarlo Stanton hit a go-ahead homer in the eighth inning amid a battle of bullpens, and the New York Yankees beat the Kansas City Royals 3-2 on Wednesday night in Game 3 of their AL Division Series at Kauffman Stadium.

Stanton finished with three hits, drove in two runs and stole a base for the first time in four years for the Yankees, who will turn to six-time All-Star pitcher Gerrit Cole on Thursday night with a chance to reach the American League Championship Series.

“We need to wrap it up tomorrow. No wiggle room,” Stanton said. “We’ve got to get it done.”

In a game dominated by pitching, the Royals used four relievers before starter-turned-bullpen ace Kris Bubic took over for the eighth. He struck out Austin Wells before Stanton hit a 3-1 pitch nearly 420 feet to left field to give New York the lead.

“He’s done it throughout his career with us,” Yankees manager Aaron Boone said. “I thought that at-bat off Bubic was just phenomenal. I think he went up there looking to do damage, looking to do just that.”

The Royals tried to answer off Luke Weaver in the bottom of the eighth, getting Bobby Witt Jr.’s first hit of the series and a two-out single by franchise stalwart Salvador Perez. But the unflappable Weaver recovered to get Yuli Gurriel to fly out, then he took care of the ninth to earn the save and cap 4 1/3 scoreless innings by the New York bullpen.

Yankees relievers have not allowed an earned run in 13 2/3 innings this postseason.

Far less successful for New York continues to be Aaron Judge, the front-runner for AL MVP. The big slugger’s postseason pratfalls continued with an 0-for-4 night, leaving Judge 1 for 11 with only an infield single in three games against the Royals.

He did have one of the Yankees’ nine walks Wednesday night, giving them 22 for the series.

“You’ve got to tip your cap to them,” Royals manager Matt Quatraro said. “They’re not chasing. They’re not expanding. But we also have to do a better job of limiting those for sure.”

It was the first playoff game at Kauffman Stadium in 3,268 days, since the Royals beat the Mets in Game 2 of the 2015 World Series; they won their first title in 30 years a few days later in New York. The first baseman on that Royals team, Eric Hosmer, was on hand to deliver the first pitch for a crowd that included Chiefs quarterback Patrick Mahomes.