An error, an infield fly rule call and a bases-loaded hit by pitch keyed a five-run sixth inning for the Boston Red Sox, who avoided a three-game sweep with an unconventional 12-8 win over the visiting Houston Astros on Thursday.Christian Arroyo homered and had four RBIs and Christian Vazquez drove in three runs on three hits for the Red Sox, who beat the Astros for just the second time in seven tries.Kyle Tucker belted a three-run double and Yuli Gurriel and Yordan Alvarez had two RBIs apiece for Houston.Boston entered the home half of the sixth down 8-7 after a Jose Altuve solo shot in the top of the inning. Enrique Hernandez led off with a double against Blake Taylor (0-1) and scored when a J.D. Martinez fly to right was dropped by Tucker.With men on first and second and one out, the infield fly rule was called on a Rafael Devers popout to short center, allowing each runner to move up. Enoli Paredes came on and walked Hunter Renfroe on 10 pitches to load the bases.After a fan rushed the field and was removed, Vazquez was plunked to put the Red Sox up 9-8. Arroyo walked in a run, and Bobby Dalbec’s two-run double off Brooks Raley put the hosts ahead by four.The rally made a winner of Darwinzon Hernandez (1-2), who allowed one run on one hit in one inning.Houston manager Dusty Baker was ejected in the seventh inning after a Gurriel chopper was ruled fair late, allowing Boston to turn a double play.