Aaron Judge and his teammates were joking about which one of them would hit the home run that gave the New York Yankees a major league-record 28 straight games with a long ball.

The 6-foot-7 slugger, batting second in the lineup, predicted the mark might fall in the first inning.

Judge was right, even though he never had a crack at it. The first chance went to leadoff man DJ LeMahieu — and nobody else got one.

LeMahieu and Judge hit back-to-back homers to begin the bottom of the first inning, and New York held on to beat the Toronto Blue Jays 4-3 Tuesday night.

"I was just trying to do what he did. He's been our MVP," Judge said. "DJ stole the show. We're happy for him. No better person I want breaking that record."

Gleyber Torres and Edwin Encarnación each poked a solo shot over the short right field porch for the Yankees, who shook off another injury to Giancarlo Stanton and won for the 10th time in 11 games. The AL East leaders are 8-1 on a 10-game homestand that wraps up Wednesday.

Aroldis Chapman allowed a run in the ninth before retiring Freddy Galvis on an easy grounder with two aboard for his 23rd save in 25 tries.

"It certainly wasn't perfect tonight, but the long ball obviously played a huge role," Yankees manager Aaron Boone said.

Stanton exited in the fourth with a bruised right knee and was scheduled for an MRI. He got tangled up with Toronto pitcher Clayton Richard (0-4) in the first while getting thrown out on a headfirst slide into third base.

The 2017 NL MVP just returned last Tuesday from injuries to his biceps, shoulder and calf that had sidelined him since March 31.

Nonetheless, the Yankees wasted no time rewriting the record book on this night.

LeMahieu hit his fourth career leadoff shot into the second deck down the left field line, breaking a mark New York shared for one day with the 2002 Texas Rangers, who homered in 27 consecutive games.

"We've got something special," Judge said.

The Yankees quickly added another one, too, when Judge followed with an opposite-field drive into the right field stands. It was the first home run since April 20 for Judge, who returned Friday from an oblique injury that sidelined him for two months.

It was the second time this season and 11th in franchise history the Yankees started a game with consecutive home runs.

Bronx Bombers, indeed.

Rookie left-hander Nestor Cortes Jr. (3-0) struck out five over 4 1/3 solid innings in relief of opener Chad Green. They combined to retire the first 12 Blue Jays batters before Cavan Biggio doubled leading off the fifth.

Danny Jansen's double in the sixth set up Eric Sogard's sacrifice fly and an RBI single by Vladimir Guerrero Jr. that chased Cortes and cut it to 3-2. Tommy Kahnle escaped trouble with two strikeouts and Stephen Tarpley, recalled from Triple-A earlier in the day, tossed a perfect seventh.

Zack Britton worked a 1-2-3 eighth and Chapman got three outs. Randal Grichuk's run-scoring single with two down trimmed it to 4-3 for the young Blue Jays.

"A lot of progress. We're playing good baseball," rookie manager Charlie Montoyo said.

Torres went deep in the second and Encarnación hit his AL-high 24th homer — third with the Yankees — off reliever Tim Mayza in the eighth.

Tagged right off the bat, Richard settled down and lasted six innings. The former backup quarterback at Michigan, pitching on a night when his alma mater was playing for the NCAA baseball championship in the College World Series, allowed three runs and eight hits.

The Wolverines lost 4-1 to Vanderbilt, setting up a winner-take-all Game 3 on Wednesday night.

"I follow from afar. It's definitely cool to see," Richard said.

NEW YORK CITY BALLET

Cortes kept the Blue Jays off balance with an array of funky windups. He dropped down, hesitated and even paused for a long beat with his stiff right leg pointed straight toward first base.

"He's really good at his craft," Boone said.

On the bench, Boone said the Yankees began calling one of Cortes' unorthodox deliveries "The Nutcracker."

"I try to stay loose out there," Cortes explained. "I try to mess up the timing."

He said he can't keep count of all his contortions and they just come to him. He said he's been doing it since 2015 in the minors — and it's been working.

"I mess around with it in the bullpens," Cortes said. "Not too much, though."

LONDON BRIDGE

When the Yankees play the rival Red Sox in London this weekend, fans on the other side of the pond will get a firsthand look at new-age baseball: New York, which is 7-0 when starting an opener, plans to do it again in the series finale Sunday.

"It's working right now," said Green, giving credit to Cortes and David Hale for their effective relief outings behind him. "Definitely looking forward to it."

TRAINER'S ROOM

Blue Jays: CF Teoscar Hernández returned to the lineup after missing two starts with a sprained left wrist. He struck out all four times up. ... 1B-DH Justin Smoak (strained left quadriceps) is expected back Friday at home against Kansas City.

Yankees: RHP Domingo Germán (left hip flexor strain) is scheduled to make a Triple-A rehab start Thursday. If all goes well, he'll likely rejoin the big league rotation next week. ... SS Didi Gregorius was rested against the lefty.

UP NEXT

Blue Jays RHP Trent Thornton (2-5, 4.25 ERA) starts the series finale Wednesday afternoon against LHP James Paxton (5-3, 3.75), who pitched a no-hitter in Toronto for Seattle last year.