BOSTON — Brett Gardner’s fifth-inning double drove in two runs and the left fielder had three RBIs on the day as the New York Yankees beat the Boston Red Sox 4-2 on Saturday at Fenway Park.

New York (15-9) won for the ninth time in its last 11 games and has taken the first two of a three-game weekend set against Boston (12-12), which will try to avoid a sweep Sunday.

Yankees right-hander Nathan Eovaldi (2-0) gave up two runs on seven hits and one walk, and he had two strikeouts in 6 2/3 innings. Right-hander Dellin Betances shut the door with a scoreless ninth for his first save.

New York designated hitter Alex Rodriguez went 1-for-4 one day after he clubbed his 660th career home run, tying Willie Mays for fourth place on the all-time home run list.

Left-hander Wade Miley (1-3) recorded a quality start, giving up three runs on seven hits while walking none and striking out three in seven innings for the Red Sox.

Designated hitter David Ortiz and third baseman Pablo Sandoval each went 2-for-4 for Boston.

Didi Gregorius led off the third inning with a ground ball single to right field, and the Yankees shortstop advanced to second base on a wild pitch with Gardner at the plate.

With one out, Gardner shot a ball down the left field line that allowed Gregorius to score, giving New York a 1-0 lead, but he was thrown out trying to stretch his double into a triple.

Second baseman Dustin Pedroia hit his fifth home run of the season with no outs in the fourth, launching an 82-mile-per-hour slider from Eovaldi over the Green Monster to tie the game at 1-1.

Center fielder Mookie Betts doubled to left in the seventh to score catcher Blake Swihart, trimming the Red Sox’ deficit to 3-2. Swihart had one hit and a walk in his major league debut.

Yankees right fielder Chris Young hit a solo homer — his sixth of the season — to left in the ninth to cap the scoring.

NOTES: Yankees DH Alex Rodriguez was back in the lineup Saturday, batting third. Rodriguez hit his 660th career home run as a pinch hitter in the eighth inning of New York’s 3-2 win on Friday, tying Willie Mays for fourth place on the all-time home run list. … 1B Mark Teixeira was hit by a pitch in his right wrist during Friday’s game, but he stayed in the game and was in the New York lineup batting fourth on Saturday. “Getting hit in the wrist is tough on hitters,” Yankees manager Joe Girardi said. … Boston C Ryan Hanigan was placed on the 15-day disabled list after breaking his right hand late in Friday night’s game. … C Blake Swihart started in his major league debut and batted ninth after being called up from Triple-A Pawtucket to replace Hanigan on the roster. “Blake is a darn good prospect,” Red Sox manager John Farrell said.