MIAMI — Jorge Alfaro homered twice before he took a foul ball to his helmet and the Miami Marlins beat the Boston Red Sox 8-4 on Wednesday night.

Garrett Cooper also homered and scored twice for Miami, which moved within 2 1/2 games of first-place Atlanta in the NL East.

Alfaro, the Marlins’ catcher, was removed in the seventh inning as a precaution after Christian Vázquez’s foul ball beaned him.

“Just getting past the baseball and just trying to make sure that he’s good and not let him catch another foul ball,” Miami Manager Don Mattingly said of the decision to remove Alfaro.

Miami chased Boston starter Michael Kickham with a four-run third. Alfaro hit his first of two two-run blasts. Brian Anderson had a run-scoring single and scored from first on Lewis Brinson’s RBI double to make it 6-1.

“We just pass the baton, we trust each other with anything,” Brinson said. “There’s no selfish player on this team. There’s nobody that’s here for their numbers.”

Alfaro also went deep in the fifth, a 412-foot shot to left-center off Robinson Leyer.

Yimi Garcia (2-0) pitched a perfect eighth and was credited with the win even though he entered with an 8-4 lead. Brandon Kintzler was the sixth Miami reliever and worked a scoreless ninth.

Miami starter Trevor Rogers was lifted after three innings and 76 pitches. Rogers allowed one run on three hits, walked two, hit a batter and struck out three.

“It tightened up on me right away,” Rogers said. “I went to the trainer and he took care of it. It feels a lot better. Location was a big issue tonight so I was trying to lock it in and compete.”

J.D. Martinez snapped a 1-for-30 funk with a two-run homer off Miami reliever Ryne Stanek in the seventh. Martinez drove in another run with a sacrifice fly in the third.

“To see him have the power to get the ball out – opposite field here, you’ve got to kill it,” Boston Manager Ron Roenicke said. “And then he followed it with a base hit. Good swings all night from him.”

Cooper hit a two-run homer to center in the first that snapped a 14-inning scoreless string by Boston pitchers.

Kickham (1-1) allowed six runs on seven hits in 2 2/3 innings.

Alex Verdugo had three hits, a walk and scored twice for Boston.

Comments are not available on this story.