Xander Bogaerts homered among his four hits and fellow rookie Mookie Betts also went deep during a big night at the plate to power the Boston Red Sox past the New York Yankees 9-4 on Tuesday.

Daniel Nava hit a three-run shot and Yoenis Cespedes tripled, doubled and singled to back Joe Kelly’s first win with Boston. Betts had three hits and slumping Mike Napoli hit two sacrifice flies for the last-place Red Sox, who have won eight of their last 11 road games.

The 21-year-old Bogaerts drove in two runs and finished a triple short of the cycle. He and Betts, born six days apart in October 1992, became the first pair of Red Sox rookies to homer at Yankee Stadium in the same game since Dick Gernert and Faye Throneberry on Aug. 9, 1952, according to a note the team posted on Twitter.

A furious Brett Gardner got ejected on a frustrating — and sometimes embarrassing — night for the Yankees, who began the day four games out of a playoff spot before losing their fifth in seven games following a five-game winning streak.

Rookie right-hander Shane Greene (4-2) was hit hard and chased in the third inning. New York had won his previous five starts.

Staked to a 6-0 lead, Kelly (1-1) gave up Martin Prado’s leadoff homer in the third and pitched through all sorts of trouble in a two-run fifth. He allowed five hits and four walks over 6 2-3 innings in his sixth start for Boston since being acquired at the July 31 trade deadline from St. Louis, where he was 2-2.

Cespedes singled and Napoli walked in front of Nava’s third home run in the third. Two batters later, Bogaerts sent an opposite-field drive to right-center for his first home run since July 29 against Toronto.

The shortstop has seven hits in his last three games after going 0 for 3 Saturday, when he was activated from the seven-day concussion disabled list.

Embarrassing baserunning cost the Yankees when they threatened to get back in the game after Brian McCann beat the shift with a bunt single in the fifth.

Prado hit a drive over Cespedes’ head in left field, and the ball short-hopped the wall. Carlos Beltran, however, got a bad read and thought the ball might be caught. So he headed back toward second before reversing course and jogging into third.

McCann had to hold up at second as Prado charged unaware toward the bag. He never even saw McCann standing on second until he was only a few steps away. That left Prado trapped between bases, so he soon gave up in a rundown and was tagged out easily.

Kelly walked his next two batters, forcing in a run, and Jacoby Ellsbury lined out with the bases loaded. Jeter’s infield single — he was initially called out before a replay review — made it 7-3.

Kelly then threw a called third strike past Gardner, who flipped his bat in disgust and fired down his helmet with two hands. He was immediately ejected by plate umpire Tim Timmons.

McCann homered in the ninth for New York.

TRAINER’S ROOM

Red Sox: 2B Dustin Pedroia was out of the lineup for the third straight game because of concussion-like symptoms. Versatile rookie Brock Holt started at 2B again.

Yankees: Ellsbury led off after being held out of the starting lineup for two games because of a sore left ankle. Ellsbury, the AL player of the week, had a pinch-hit double Sunday in Toronto. Gardner batted third for the first time in his career, according to STATS, and struck out all three times up. … RHP David Phelps (elbow inflammation) threw 25 pitches in a bullpen session and is scheduled to throw 35 in another one Friday before a simulated game Sunday.

UP NEXT

Red Sox RHP Anthony Ranaudo (3-0, 4.50 ERA) was recalled from the minors and expects about 30-40 family members and friends in the stands when he makes his fourth major league start Wednesday night. Ranaudo grew up nearby in Jackson, New Jersey, and said he went to countless games at the old Yankee Stadium.

“I can’t even describe how excited I’m going to be,” Ranaudo said, wondering if he would be able to fall asleep Tuesday night. “There’s going to be a lot of emotions.”

Ranaudo beat the Yankees in his big league debut Aug. 1 at Fenway Park. Hiroki Kuroda (9-8, 3.88) pitches for New York.

Join our Newsletter for the latest news right to your inbox