Christian Arroyo rounds the bases after hitting a three-run homer Thursday night against the Houston Astros. Elise Amendola/Associated Press

BOSTON — J.D. Martinez hit his 13th homer, Christian Arroyo had a three-run drive and the Boston Red Sox took advantage of a pair of dropped balls in a five-run sixth inning to beat the Houston Astros 12-8 Thursday night, avoiding a three-game sweep.

Right fielder Kyle Tucker dropped Martinez’s sacrifice fly that tied the score at 8 for an error as the batter reached, and shortstop Carlos Correa let Rafael Devers’ bases-loaded pop to short center glance off his glove but got the out because the infield fly rule was called.

Yuli Gurriel and José Altuve homered for the Astros. Altuve led off the sixth with a home run on a pitch from Darwinzon Hernandez that was 0.85 feet above the ground. According to MLB Statcast, it was the lowest pitch hit for a home run in the major leagues since the start of 2018.

Astros Manager Dusty Baker did not make it to the end of the 3-hour, 47-minute game. He was ejected in the seventh for arguing that a play on which Yuli Gurriel grounded into a double play should have been a foul ball.

Hernandez (1-2) got the win despite after allowing Altuve’s homer.

Kiké Hernández doubled off Blake Taylor (0-1) leading off the bottom half and scored the tying run on Martinez’s fly to deep right.

Xander Bogaerts walked, and for a moment it appeared Devers reached to load the bases before second-base umpire John Tumpane signaled the infield fly for the second out.

Enoli Paredes relieved and loaded the bases with a walk to Hunter Renfroe, then hit Vazquez on the elbow with an 0-1 curveball, forcing in the go-ahead run.

Paredes walked Arroyo on six straight fastballs, putting Boston up 10-8. Brooks Raley relieved, and Bobby Dalbec hit a two-run double.

Astros starter Zack Greinke allowed four runs and seven hits in three innings. Brandon Bielak, recalled from Triple-A Sugar Land on Wednesday, gave up three runs and four hits over two innings.

HOLD UP

Altuve thought he had a leadoff double in the fourth with a line drive off the Green Monster in left, but was thrown out by Alex Verdugo, who fielded the ball off the wall and threw to Arroyo at second. Arroyo had the ball before Altuve began to slide.

TRAINER’S ROOM

Red Sox: Verdugo returned after missing two games because of tightness in his back. … Right-hander Brandon Brennan was called up from Triple-A Worcester, where he made eight relief appearances and held opponents to two runs on six hits over 8 1/3 innings with a 2.16 ERA. … Right-hander Phillips Valdéz was optioned to Worcester.

Comments are not available on this story.