BOSTON — Alex Rodriguez tied Willie Mays for fourth on the all-time home run list, hitting his 660th career homer on a 3-0 fastball in the eighth inning to give the Yankees a 3-2 win over the Red Sox in the opener of a three-game weekend set at Fenway Park on Friday night.

It was the first career pinch-hit home run for the Yankees infielder, who was originally given the night off before replacing designated hitter Garrett Jones with one out in the eighth in a 2-2 game.

New York (14-9) won for the fourth time in its last five games and handed Boston (12-11) its first series-opening loss of the season after winning seven in a row entering Friday.

After a solo home run from right fielder Allen Craig gave the Red Sox a 2-1 lead in the fourth, Yankees catcher Brian McCann tied the game with an RBI-single to left in the seventh.

Rodriguez’s milestone shot an inning later provided New York with the game-winning run.

C.C. Sabathia did not receive a decision, with the Yankees left-hander giving up two earned runs on seven hits and two walks while striking out three in 6.0 innings. Right-hander Esmil Rodgers earned the win in relief and Andrew Miller pitched a scoreless ninth for his ninth save.

Justin Masterson also received a no-decision, as the Red Sox right-hander allowed two earned runs on six hits and three walks and striking out a pair. Right-hander Junichi Tazawa was the losing pitcher after giving up the home run to Rodriguez.

Jacoby Ellsbury led off the game with a single to right, and a walk from first baseman Mark Teixeira moved the center fielder to second base with one out.

Right fielder Carlos Beltran rifled an 0-1 fastball to the gap in left-center to plate Ellsbury, giving the Yankees an early 1-0 lead after the top of the first inning.

Xander Bogaerts gave Boston’s offense the jolt it needed in the third. A leadoff liner down the third-base line reached the wall in left, allowing the shortstop to reach second without a throw.

A sacrifice fly to deep left-center from catcher Ryan Hanigan moved Bogaerts to third, and center fielder Mookie Betts followed up with a sac fly to center, tying the game.

Masterson worked his way out of a jam in the fourth, fanning designated hitter Garrett Jones and forcing second baseman Stephen Drew to ground out to strand runners on second and third.

Craig deposited a solo home run into the first row of the Green Monster in left on a 1-0 fastball with two outs in the fourth, giving Boston a 2-1 lead.

Interference cost the Red Sox a run later in the frame as Hanigan’s line-hugging hit to left was touched by a fan, reverting it to a ground-rule double and bringing Bogaerts back to third.

Masterson found himself in trouble again in the fifth — loading the bases on Ellsbury’s single, a walk to Teixeira, and a hit-by-pitch to McCann with two away — but he skirted danger once more by forcing Beltran to ground out to first and preserve the one-run lead.

Indians 9, Blue Jays 4

CLEVELAND — The Cleveland Indians belted three home runs and right-hander Carlos Carrasco pitched six solid innings to fuel a 9-4 victory over the Toronto Blue Jays on Friday night at Progressive Field.

Second baseman Jason Kipnis, left fielder Michael Brantley and catcher Brett Hayes homered as Cleveland registered a rare victory over a left-hander.

The Indians, who have a lineup filled with left-handed hitters, came into the game with a 1-8 record against left-handed starters, but they roughed up veteran lefty Mark Buehrle (3-2) for eight runs and 11 hits in less than five innings.

Carrasco (3-2) pitched six innings and gave up four runs and six hits but finished strong, holding Toronto scoreless on one hit in his last three innings.

Following Carrasco to the mound, right handers Scott Atchison, Zach McAllister and Cody Allen combined to pitch three scoreless innings on two hits.

Cleveland erupted for 13 hits, with every player in the lineup getting at least one hit. The top three hitters in the lineup — Kipnis, shortstop Mike Aviles and Brantley — were a combined 6-for-13 with two home runs, a double, five runs scored and three RBIs.

The scoring started immediately as both teams’ leadoff hitters belted first-inning home runs.

In the top of the first, Toronto third baseman Josh Donaldson hit Carrasco’s second pitch of the game over the left field wall.

In the bottom of the inning, Kipnis led off with a home run over the right field wall against Buehrle.

Marlins 4, Phillies 3

MIAMI — Center fielder Marcell Ozuna hit a walk-off double to lead the Miami Marlins past the Philadelphia Phillies 4-3 at Marlins Park on Friday night.

Marlins right fielder Giancarlo Stanton led off the bottom of the ninth with a walk. Ozuna, who went 4-for-4 with three doubles, then hit a drive to left, and Stanton slid home ahead of the attempted tag by Phillies catcher Carlos Ruiz. The play survived a video review, and Ozuna raised his batting average to .315.

The Marlins (11-12) have won eight of their past nine games and are close to being over .500 for the first time this season.

Philadelphia (8-16) has lost four games in a row.

Reliever Steve Cishek (1-1) earned the win.

Phillies reliever Ken Giles (1-1) took the loss when he gave up an earned run for the first time this season.

Miami opened the scoring in the second. Ozuna doubled, advanced on a groundout and scored on a sacrifice fly by catcher J.T. Realmuto.

The Phillies took a 3-1 lead in the fourth on a three-run homer to right by second baseman Chase Utley, who started the day hitting just .114. Utley pulled the first pitch he saw — an inside fastball –for his third homer of the season.

Miami tied the score with two runs in the fifth on a run-scoring single by third baseman Martin Prado and an RBI double by Stanton.

Braves 4, Reds 3

ATLANTA — Right-hander Mike Foltynewicz won his first major league start, helping his own cause by driving in two runs to lift the Atlanta Braves to a 4-3 win over the Cincinnati Reds on Friday night at Turner Field.

Foltynewicz (1-0), acquired in an off-season trade with Houston for slugging catcher Evan Gattis, was called up Friday and given his first starting assignment. He survived a shaky first inning when he threw 28 pitches but got stronger and lasted five innings, allowing three runs (two earned), six hits and three walks with two strikeouts.

Just as surprising was the double he hit to center field that produced Atlanta’s first two runs. It came in only his second professional at-bat; Foltynewicz never batted in the minor leagues.

The winning margin came from left fielder Kelly Johnson, who launched a two-run homer deep into the right field stands in the fifth inning that erased a 3-2 deficit.

The Atlanta bullpen finished with four scoreless innings: 1 2/3 from Cody Martin, 1/3 from Luis Avilan and one each from Jim Johnson and Jason Grilli, who pitched around a single in the ninth to post his eighth save.

Cincinnati rookie Anthony DeSclafani (2-2) pitched five innings and allowed four runs, four hits and five walks with five strikeouts.