BOSTON -- As the boos, by far the loudest he's heard all season, intensified, Alex Rodriguez, standing in the on-deck circle taking his warmup cuts, stared ahead.

Fenway Park fans kept the boo-meter level at a constant through Ball 1, Ball 2 and Ball 3, and then . . .

An unmistakable "crack" cut through it all -- the sound of the 660th homer of A-Rod's career flying over the Green Monster in left. The laser shot snapped a 2-2 tie and lifted the Yankees to a 3-2 victory in front of 35,444.

The first pinch-hit homer of Rodriguez's career -- he had been 1-for-16 as a pinch hitter -- brought cheering Yankees players and coaches to the top step of the dugout, leaving no doubt where they stood regarding the homer that drew A-Rod even with Willie Mays for fourth on the all-time list.

During the offseason, Yankees hierarchy had made it clear to Rodriguez where they stood, telling him they did not plan to pay him the $6-million bonus that would come with No. 660. Their perspective was that his past PED use made the milestone unmarketable.

That battle, should it be fought, is likely to end up in front of an arbitrator.

Shortly after the home run, the Yankees posted on their official Twitter account: "With his homer in the 8th inning, @AROD ties Willie Mays with No. 660."

Speaking before the game, Joe Girardi said he wanted 660 out of the way, both for his club's benefit and A-Rod's. "The sooner we get it out of the way, the better," he said.

Girardi did not start the slumping Rodriguez Friday night, going with Garrett Jones at DH. A-Rod entered the game hitting .135 with a .319 on-base percentage, one homer and two RBIs in his previous 10 games.

Pinch hitting for Jones, Rodriguez got ahead 3-and-0 before lining Junichi Tazawa's 95-mph fastball over the Green Monster in leftfield for his sixth homer of the season.

Dellin Betances allowed a walk and a single in the eighth but struck out Brock Holt and Xander Bogaerts to escape the jam. Former Red Sox lefthander Andrew Miller pitched a perfect ninth to earn his ninth save in as many chances.

CC Sabathia pitched fairly well, allowing two runs and seven hits in six innings. He narrowly avoided giving up runs twice, aided by the bounce of the ball: a fan touched one double and a second one bounced into the stands.

Red Sox righty Justin Masterson allowed two runs and six hits in six innings.

The Yankees (14-9) gave Sabathia a 1-0 lead before he took the mound. Jacoby Ellsbury improved to 13-for-his-last-28 with a leadoff single and scored on Carlos Beltran's two-out double to left-center.

The Red Sox drew even in the third. Bogaerts led off with a double into the leftfield corner and came around on fly balls by Ryan Hanigan and Mookie Betts.

Allen Craig's hit a two-out homer in the fourth to give the Red Sox a 2-1 lead. But Masterson walked Gregorius to start the seventh, reliever Tommy Layne hit Mark Teixeira on the right hand with two outs and Brian McCann delivered an RBI single.