TORONTO — Aaron Judge hit a two-run homer to snap a scoreless tie in the 13th inning, Giancarlo Stanton went deep moments later and the New York Yankees beat the Toronto Blue Jays 3-0 on Wednesday night for a two-game sweep.

Yankees starter Sonny Gray allowed two hits in eight sparkling innings. Judge ended an 0-for-15 slump by connecting off right-hander Joe Biagini (0-5) for his team-leading 17th home run. Stanton added a laser shot to left field, his 14th, as New York won for the seventh time in eight games.

David Robertson (4-2) worked one inning for the win and Aroldis Chapman finished for his 15th save in 16 opportunities.

Judge returned to the lineup after sitting out Tuesday. He went 0 for 9 with a record eight strikeouts in Monday’s doubleheader at Detroit.

Biagini, the seventh Toronto pitcher of the game, 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.

Stanton’s home run never went higher than 45 feet off the ground.

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.

RANGERS 8, ATHLETICS 2: Bartolo Colon worked five innings for his 243rd career victory, matching Hall of Fame pitcher Juan Marichal for the most by a player born in the Dominican Republic, as Texas beat visiting Oakland.

NATIONAL LEAGUE

PADRES 3, BRAVES 1: Matt Strahm and four other relievers combined on a four-hitter as host San Diego took 2 of 3 from Atlanta.

The Padres turned to their bullpen for the second time in 11 games because rookie left-hander Joey Lucchesi remains on the disabled list.

GIANTS 5, DIAMONDBACKS 4: Pinch-hitter Alen Hanson had a tying, two-run homer off Brad Boxberger with two outs in the ninth inning and Brandon Crawford singled home Andrew McCutchen in the 10th as San Francisco won at home.

ROCKIES 6, REDS 3: Ian Desmond hit a two-run homer, and Gerardo Parra and Tony Wolters each drove in a pair of runs as Colorado won at Cincinnati.

PIRATES 11, DODGERS 9: Josh Harrison went 2 for 3 with a bases-clearing double, David Freese and Gregory Polanco drove in two runs each and Pittsburgh broke out of an extended offensive funk by outlasting visiting Los Angeles.

INTERLEAGUE

INDIANS 3, BREWERS 1: Carlos Carrasco struck out 10 and allowed one run in seven innings as Cleveland won at home.

NATIONALS 11, RAYS 2: Anthony Rendon had four hits and drove in three runs, as Washington routed visiting Tampa Bay.

ORIOLES 1, METS 0: Manny Machado had a sacrifice fly, Dylan Bundy was stellar over seven scoreless innings and the major league-worst Orioles won at New York.

NOTES

CARDINALS: Red Schoendienst, the Hall of Fame second baseman who managed St. Louis to two pennants and a World Series championship in the 1960s, died Wednesday.

He was 95.

One start after his return from Tommy John surgery, right-hander Alex Reyes had a season-ending operation that repaired a tendon attached to the strained latissimus dorsi muscle in the upper right side of his back.

Recovery time is expected to be six months.

ANGELS: Shortstop Andrelton Simmons was placed on the 10-day disabled list because of a right ankle sprain.

Simmons was hurt Tuesday when he slipped coming down the dugout stairs before the 1-0 win over the Kansas City Royals. He left the game after the second inning.

TRADE: The Arizona Diamondbacks acquired outfielder Jon Jay in a trade with the Kansas City Royals in exchange for minor league pitchers Elvis Luciano and Gabe Speier.