BOSTON — Alex Rodriguez tied Willie Mays for fourth place in major league history with his 660th home run, breaking an eighth-inning tie with a pinch-hit shot that sent the New York Yankees to a 3-2 win over the Boston Red Sox on Friday night.

Yankees manager Joe Girardi left Rodriguez out of the starting lineup to rest him but sent him up to bat for Garrett Jones with one out in the eighth.

Rodriguez ran the count to 3-0, then lined a fastball from Junichi Tazawa (0-1) into the left-field seats above the Green Monster – his first career homer as a pinch hitter – and jogged around the bases to boos from the crowd at Fenway Park, where he made his major league debut with Seattle in 1994.

The Yankees’ reaction was a bit subdued for a teammate who was suspended all last season for his involvement in the Biogenesis performance-enhancing drug scandal. Players stayed in the dugout, applauding. But when A-Rod arrived, Girardi gave him a high-five and teammates shook his hand and enthusiastically patted him on the back.

Rodriguez and the Yankees have a $30 million marketing agreement that calls for payments of $6 million each for up to five accomplishments, payable within 15 days of designation by the team. The accomplishments were contemplated to be home runs 660, 714, 755, 762 and 763.

The Yankees, though, are thinking about letting the milestones pass without making a designation. Due to his drug suspension, the marketing possibilities for the milestones have been ruined, the Yankees appear to be set to argue.

Still, only three players have hit more homers than Rodriguez – Barry Bonds (762), Hank Aaron (755) and Babe Ruth (714).

Rodriguez’s 660th came after he had struggled for his previous 10 games, going 5 for 37 with one homer and two RBIs. His 659th came on Sunday, but he was 0 for 6 in his most recent game with four strikeouts and a game-ending double play in a 3-2 loss in 13 innings to the Tampa Bay Rays on Wednesday night.

Esmil Rogers (1-1) got the win by pitching a scoreless seventh. Andrew Miller worked a perfect ninth for his ninth save.

With right-hander Justin Masterson starting for Boston, the Yankees had six lefties and three switch-hitters in the starting lineup. Rodriguez bats right-handed.

The Yankees scored in the first on an RBI double by Carlos Beltran after a single by Jacoby Ellsbury and a walk to Mark Teixeira.

The Red Sox tied it in the third when Xander Bogaerts doubled, took third on a flyout by Ryan Hanigan and scored on a sacrifice fly by Mookie Betts.

Allen Craig’s first homer of the season in just his sixth start put Boston ahead 2-1 in the fourth.

Then New York tied it at 2 in the seventh when Didi Gregorius walked, went to second when Teixeira was hit by a pitch and scored on a single by Brian McCann.

CC Sabathia had a solid outing after losing his four other starts this year. He gave up two runs and seven hits in six innings. Masterson allowed two runs on six hits in six innings.