J.D. Martinez homered in his third straight game, rookie Michael Chavis singled home the winning run in the 10th inning and the Boston Red Sox recovered after blowing a five-run lead to beat the Colorado Rockies 6-5 on Wednesday night.

Martinez hit a two-run shot and Eduardo Rodriguez struck out 10 over six innings for the Red Sox, who won for the 12th time in 15 games. They split the two-game set to remain unbeaten (13-0-4) in their last 17 interleague series at Fenway Park.

Trevor Story had a two-run single and Tony Wolters doubled twice for Colorado, which had won four of five.

Xander Bogaerts opened the 10th with a double on the first pitch from Chad Bettis (1-3). After Rafael Devers was intentionally walked, Chavis hit a grounder up the middle on the next pitch to win it.

Brandon Workman (3-1) struck out David Dahl with two runners on to end the top of the 10th.

A night after Boston ace Chris Sale became the first pitcher in major league history to strike out 17 batters in seven innings - and Colorado matched a franchise worst with 24 Ks - Rodriguez had the Rockies whiffing again. They ended up with 16 strikeouts in all.

But, as on Tuesday when they rallied for a 5-4 victory in 11 innings, the Rockies overcame an early deficit.

Boston had built a 5-0 lead with two runs in the first and three in the third against German Márquez, who entered 5-0 with a 2.02 ERA in nine career interleague starts.

In the seventh, the Rockies loaded the bases with nobody out against Rodriguez. Ryan McMahon singled and Wolters doubled before Rodriguez plunked Charlie Blackmon with a pitch and was pulled. Matt Barnes gave up Story's two-run single and, with Story running from first on a 3-2 pitch with one out, pinch-hitter Daniel Murphy bounced to second, scoring Blackmon to tie it.

Dahl had a sacrifice fly and Wolters a run-scoring double in the fourth to make it 5-2.

Mookie Betts' RBI single made it 3-0 before Martinez, unlike his other three homers the past four days that went over the Green Monster in left field, drove a slider into Boston's bullpen in right.

FIVE AND DONE

Both starters gave up five runs and were pulled in the seventh.

Márquez went 6 1/3 innings, striking out six with 10 hits and a walk. Rodriguez allowed nine hits and walked one.

TRAINER'S ROOM

Rockies: Murphy, who entered batting just .200, started on the bench for the fifth time in seven games. Colorado manager Bud Black said it had nothing to do with a fractured left index finger that caused Murphy to miss 3½ weeks. . Story left the game after a collision with left fielder Raimel Tapia in the ninth.

Red Sox: Manager Alex Cora said LHP David Price (on the injured list with left elbow tendinitis since May 3) is scheduled to throw a bullpen Friday and if it goes well, he'll "probably" start next week in Toronto. . 2B Dustin Pedroia took grounders with the other infielders before batting practice as he continues to try to work back to a rehab assignment from soreness in his surgically repaired left knee that's limited him to nine games over the past two seasons.

UP NEXT

Rockies: After a day off Thursday, RHP Jon Gray (3-3, 4.25 ERA) is slated to start the opener of a three-game series in Philadelphia on Friday against LHP Cole Irvin (1-0, 1.29).

Red Sox: Off on Thursday before RHP Rick Porcello (3-3, 5.15) looks win his fourth straight decision Friday. Houston RHP Gerrit Cole (4-4, 3.88) is scheduled to start in the teams' first meeting since Boston defeated the Astros in the AL Championship Series last fall.