BOSTON — Carlos Gonzalez, Trevor Story and Dustin Garneau each hit two-run homers for Colorado, and the Rockies beat the Red Sox 8-2 Thursday night at Fenway Park.

Boston center fielder Jackie Bradley Jr. went 0-for-4, snapping his 29-game hitting streak, which was the longest in the majors this year.

Nolan Arenado and DJ LaMahieu also drove in a runs for Colorado, which pounded out 12 hits to halt a three-game skid. The Rockies (22-24) salvaged the finale of a three-game series.

Rockies starter Jon Gray (2-2) won his first career start at Fenway Park, throwing 7 1/3 innings of two-run ball. He allowed five hits and three walks while striking out six.

Boston (29-18) saw its four-game winning streak end.

Bradley hit a first-pitch groundout in his final at-bat in the eighth to conclude his streak.

David Ortiz launched a two-run homer, and Xander Bogaerts extended his hitting streak to a career-high 19 games for the Red Sox, who lost only two of their previous 15 home games.

Bogaerts’ streak is now the longest active in the majors.

Boston starter Clay Buchholz (2-5) was serenaded by booing Red Sox fans upon his departure. He allowed all three Rockies homers and six runs total on six hits while striking out two over five innings.

Bogaerts’ streak-stretching single in the first inning preceded Ortiz’s two-run blast.

Buchholz kept the Rockies’ bats quiet for three frames before Gonzalez unloaded on a 2-1 pitch in the fourth for a game-tying, two-run homer — his first in nine games.

Story feasted on a mislocated Buchholz fastball for another two-run bomb in the fifth and Garneau slugged one of his own two at-bats later as Colorado built a four-run advantage.

Arenado hit a bases-loaded sacrifice fly in the seventh, and LeMahieu capped the scoring with an RBI single in the ninth.

Mookie Betts, who was not in the starting lineup, entered as a pinch hitter with two runners on in the Boston ninth, but grounded out to end the game. Bradley was on deck when the last out was recorded.

NOTES: Former Boston 3B Wade Boggs’ No. 26 was retired in a pregame ceremony. “Greatest day of my life,” said Boggs, who also threw out a ceremonial first pitch. The ceremony was attended by many of Boggs’ teammates. Boggs, a Hall of Famer and 12-time All-Star who won five American League batting titles, hit .338 over his 11 seasons with the Red Sox. … Red Sox 2B Dustin Pedroia (right hamstring tightness) and SS Xander Bogarts (lacerated finger on right hand) were in the starting lineup Thursday. RF Mookie Betts (rest) did not start. Chris Young started in right field. … Giants RHP Matt Cain (1-5, 5.37 ERA) counters Rockies RHP Tyler Chatwood (5-3, 3.02 ERA) on Friday in San Francisco. Red Sox RHP Joe Kelly (2-0, 5.28 ERA) battles Blue Jays RHP Aaron Sanchez (4-1, 3.20) in Toronto on Friday night.

Blue Jays 3, Yankees 1

NEW YORK — J.A. Happ pitched seven sharp innings and the Toronto Blue Jays scored two unearned runs in the third inning off CC Sabathia in a 3-1 victory over the New York Yankees on Thursday.

Edwin Encarnacion had a two-run single for the Blue Jays, who won for the fifth time in eight games and 10th time in their last 13 trips to New York. Devon Travis added insurance with an RBI single in the ninth off Aroldis Chapman.

Happ’s lone mistake was a 1-0 fastball to Starlin Castro with two outs in the first inning. Happ’s eighth pitch of the game went into the right-center field seats, but the left-hander (6-2) did little else wrong.

Happ put four runners on base and none were Carlos Beltran or Alex Rodriguez. He struck out Beltran three times and Rodriguez once while also getting the Yankees designated hitter on a groundout and a flyout.

Beltran was 0-for-4 with four strikeouts and Rodriguez struck out twice in four hitless at-bats in his return from a strained right hamstring.

Happ’s biggest threats occurred in the fifth and seventh.

In the fifth, he gave up consecutive one-out singles to Chase Headley and Didi Gregorius but quickly got Austin Romine on a double play.

In the seventh, Happ walked Chase Headley with two outs and fell behind Gregorius, but ended the at-bat with a groundout to second.

Gavin Floyd struck out Castro with a runner on second to end the eighth. Roberto Osuna struck out Beltran and Rodriguez in the ninth for his 10th save of the season.

Sabathia (3-3) made his second start since coming off the disabled list and allowed two unearned runs and two hits in seven innings. After Encarnacion’s hit, Sabathia allowed one other baserunner.

Devon Travis opened the third by reaching on an error by Gregorius. A single by Jose Bautista and a walk to Josh Donaldson loaded the bases before Encarnacion gave Toronto the lead with a single to left.

Marlins 9, Rays 1

ST. PETERSBURG, Fla. — Miami Marlins ace Jose Fernandez won in his old backyard for the first time, striking out 12 batters in seven innings as Miami cruised to a 9-1 win over the Tampa Bay Rays on Thursday afternoon at Tropicana Field.

Fernandez (7-2), a first-round pick out of Tampa’s Alonso High School in 2011, had lost in two previous starts at the Trop, but got plenty of run support Thursday, earning a win for the sixth straight start. The Marlins (25-22) took three of four games from their in-state rivals, while the Rays (21-24) saw their bats held in check for the second day in a row.

Miami jumped out to a 3-0 lead in the second inning, getting a two-run home run from Adeiny Hechavarria, his third of the season, and Chris Johnson added another two-run home run in the third for a 5-0 lead on Rays starter Drew Smyly (2-6). Miami entered the game with the NL’s best average against left-handers and had six hits in six innings off Smyly.

Fernandez’s 12 strikeouts are his most since he had 13 on Opening Day, and it’s also the most against the Rays this season, trumping the 11 from Detroit’s Michael Fulmer. Every Rays starter struck out at least once, with Steven Souza Jr. going down three times. Fernandez had just one walk in his 111-pitch outing.

The Rays got their lone run on a solo home run by Brandon Guyer — his sixth — in the fourth inning. Miami padded its lead with three runs in the eighth on five straight hits off reliever Ryan Garton, who made his major-league debut.

Garton pitched a scoreless seventh before struggling in the eighth. Miami finished with 15 hits, one short of its season high.