TORONTO — In two days, Yankees slugger Aaron Judge went from terrible to triumphant.
Judge hit a two-run homer to snap a scoreless tie in the 13th inning, Giancarlo Stanton went deep moments later and New York beat the Toronto Blue Jays 3-0 on Wednesday night for a two-game sweep.
Judge bounced back from what he called a "terrible day" on Monday at Detroit, where he went 0 for 9 with a record eight strikeouts in a doubleheader. After a night off Tuesday, the slugger ended an 0-for-15 slump by connecting off right-hander Joe Biagini (0-5) for his team-leading 17th home run.
"That's what I love about baseball," Judge said. "You've got ups, you've got downs. No matter how good or how bad you did, you get to wake up the next day and start all over."
Stanton added a laser shot to left field, his 14th homer, as New York won for the seventh time in eight games.
Yankees manager Aaron Boone praised Judge for not letting Monday's rough day affect him.
"He commands his emotions so well," Boone said. "He's so mature. He just deals with whatever comes his way as good as anyone that I've been around. I never really get a sense that he's pressing."
Judge was rested Tuesday, but said he "wasn't happy about it."
Yankees starter Sonny Gray allowed two hits in eight sparkling innings.
"He was doing what he wanted with the ball," catcher Austin Romine said. "It was pretty fun to catch."
David Robertson (4-2) worked one inning for the win and Aroldis Chapman finished for his 15th save in 16 opportunities.
Biagini, the seventh Toronto pitcher, came on to start the 13th. Brett Gardner reached on a one-out single and Judge followed with a long drive to left-center.
One out later, Stanton sent a screaming line drive to left. The ball came off his bat at 119.3 mph, the second-hardest hit ball in the majors this year behind a 119.9 mph single by Judge off Angels pitcher Garrett Richards on May 27, according to Statcast.
"I think that's maybe the hardest ball I've ever seen hit," Boone said.
Stanton's home run never went higher than 45 feet off the ground.
"That got out in a hurry," Judge said. "We didn't have time to celebrate or do anything."
The Yankees are the only major league team that hasn't been shut out this season. They have 49 home runs in 28 road games. Only Oakland (54) has homered more often on the road.
Toronto lost for the first time in six extra-inning games this season. The Blue Jays have lost 10 of 11 at home and 17 of 22 overall.
Gray matched a season high by striking out eight. He retired his first 12 batters before Justin Smoak doubled to begin the fifth. Kendrys Morales advanced Smoak to third with a single, but he was thrown out trying to score on Kevin Pillar's grounder to third. Russell Martin walked to load the bases before Devon Travis grounded into an inning-ending double play.
Pillar said Gray made it tough on Toronto.
"He was attacking the zone and throwing a couple different pitches for strikes," Pillar said.
Blue Jays right-hander Sam Gaviglio gave up three hits in a career-best seven innings. He threw a career-high 104 pitches.
"He was really, really good," manager John Gibbons said.
Judge's shot was the first extra-inning home run of his career.
LEAST OF THE EAST
Toronto has lost seven straight against AL East opponents and is 8-17 in division play, the worst record in the East.
Blue Jays: 3B prospect Vladimir Guerrero Jr. left Wednesday's game for Double-A New Hampshire because of an undisclosed injury. Guerrero returned to the lineup Tuesday after missing the previous two games because of a sore left ankle. New Hampshire manager Jon Schneider said Guerrero's latest injury is not considered serious.
Yankees: After a day off Thursday, RHP Masahiro Tanaka (7-2, 4.79 ERA) starts Friday night in the opener of a three-game Subway Series at Citi Field against the New York Mets. Tanaka is 5-0 in his past eight starts. RHP Jacob deGrom (4-0, 1.49) pitches for the Mets.
Blue Jays: LHP Jaime Garcia (2-4, 6.08) starts the opener of a four-game series against Baltimore. Garcia has lost four straight decisions and left his June 1 start at Detroit after giving up four runs in a season-low 1 2/3 innings. RHP David Hess (2-2, 3.47) goes for Baltimore.