BOSTON — Eduardo Rodriguez pitched well ... until the seventh inning.

The Red Sox left-handed starting pitcher allowed just two runs, recorded 18 swings-and-misses and struck out 10 batters through the first 6 innings.

But Rodriguez returned for the seventh at 99 pitches. And he allowed a leadoff single to Rockies No. 8 hitter Ryan McMahon, then a ground-rule double to Tony Wolters. He hit leadoff hitter Charlie Blackmon with a pitch.

Red Sox manager Alex Cora replaced him with reliever Matt Barnes who allowed all three inherited runners to score.

The Red Sox won despite the seventh-inning meltdown. Boston walked off with a 6-5 victory over Colorado here at Fenway Park.

Why did Cora send Rodriguez back out for the seventh?

“We’ve got all those lefties coming up, and there’s a trust factor,” Cora explained. “(He’s) a guy that we believe (in). He needs to go deep into the game. And the matchups."

McMahon, Wolters and Blackmon all are left-handed hitters.

“Although he has struggled against lefties, we felt like, ‘You get those guys’ and then we get Barnsey with one or two outs."

Rodriguez has reverse splits this season. Left-handed hitters are batting .351 against him. Righties are batting .261 against the lefty.

Cora added, “The leadoff guy was going to be the last hitter anyways. We were going to a righty."