Alex Verdugo #24 of the Yankees celebrates in the dugout...

Alex Verdugo #24 of the Yankees celebrates in the dugout after scoring off a Aaron Judge #99 single in the ninth inning of their MLB game against the Toronto Blue Jays at Rogers Centre on April 17, 2024 in Toronto. Credit: Getty Images

TORONTO — A Yankees offense in stall-mode of late found a spark just in time.

Rallying from the three-run deficit they faced going into the eighth inning, the Yankees, with a slumping Aaron Judge providing a go-ahead two-out, two-run single in the ninth, avoided a four-game losing streak with a 6-4 victory over the Blue Jays on Wednesday in front of 30,233 at Rogers Centre.

The Yankees (13-6), limited to four hits Monday and six on Tuesday, produced 11 hits Wednesday, three by Juan Soto. The rightfielder went 3-for-3 with a double, home run and two walks.

His fourth homer of the season, a solo shot in the eighth inning, seemed to jump-start the offense. It cut the Yankees’ deficit to 4-2.

“We have all the confidence,” said Soto, who is hitting .352 with four homers and a 1.055 OPS and whose homer marked his 500th career RBI. “We grind it every day, we play 27 outs. I have really good confidence in this team. We all know what kind of players we have so I trust every single one of them.”

Toronto righthander Erik Swanson, activated Monday from the injured list and making his season debut, gave up a 437-foot homer to Giancarlo Stanton (No. 5) leading off the ninth, making it 4-3.

“He damn near hit it out of the stadium,” Judge said of Stanton’s blast, which came off the bat at 111.8 mph.

Soto’s homer perked up the visitor’s dugout in the eighth and Stanton’s ignited it in the ninth.

“That’s one swing away now with three outs [to go], and a bunch of guys ready to have good at-bats and put the ball in play,” Stanton said of the significance of his home run. “Definitely didn’t hurt.”

Gleyber Torres, 0-for-3 with three strikeouts going into the ninth and in a 4-for-31 slide overall, singled and Alex Verdugo doubled down the rightfield line before Oswaldo Cabrera grounded sharply to second, keeping it a one-run game.

In came lefty Tim Mayza to face the lefthanded-hitting Austin Wells and the Yankees countered with the righty-swinging Jose Trevino to pinch hit. The veteran catcher, 5 for his last 11 coming in, lined a single to center, tying it at 4-4.

After Anthony Volpe fouled out and Soto walked for the second time, Judge, in a 5-for-37 slide, yanked a full-count sinker over the third base bag to make it 6-4.

“In that situation, just put the ball in play,” Judge said. “Try to create something. Guys in front of me were having great at-bats to kind of lead to that moment. Once you step in there, just have some fun and try to take a good swing.”

Clay Holmes, though he allowed a one-out single to Kevin Kiermaier to bring the tying run to the plate, improved to 7-for-8 in saves with a scoreless ninth, retiring George Springer and Vlad Guerrero Jr. to end it. Volpe made a sliding stop on the outfield turf behind second and gunned down Guerrero Jr. for a highlight-reel finish.

“He’s a Gold Glover for a reason,” Trevino said of the second-year shortstop.

The victory allowed the Yankees, who lost three straight after opening this six-game trip with a doubleheader sweep of the Guardians in Cleveland, to finish 3-3.

Until the late innings, the afternoon was a struggle on offense.

After Chris Bassitt controlled the Yankees’ bats Monday night and Yusei Kikuchi did the same Tuesday, Kevin Gausman took his turn Wednesday.

The righthander, tattooed by the Yankees April 6 at the Stadium in a 9-8 loss when he allowed six runs (five earned) in 1 1⁄3 innings, allowed one run and four hits over five innings Wednesday. Gausman, who toted an 11.57 ERA into the afternoon, walked three and struck out six.

Marcus Stroman, who came up with the Blue Jays and pitched for them from 2014-19, threw well in his third career start against the team that drafted him in 2012. The Long Island native allowed two runs, six hits and a walk over 5 1⁄3 innings in which he struck out two. His ERA is 2.42.

“I feel like we’re never out of it,” Stroman said. “I feel like it’s a priority on the starters and the relievers to just keep the game close because this lineup, 1 through 9, it’s hard to navigate. We felt we were within striking distance the whole game.”

More Yankees headlines

Newsday LogoSUBSCRIBEUnlimited Digital AccessOnly 25¢for 5 months
ACT NOWSALE ENDS SOON | CANCEL ANYTIME