HOUSTON (AP) -- Carlos Pena hit a three-run homer in the 10th inning, giving the Houston Astros a 7-4 win over the Milwaukee Brewers on Thursday.
Carlos Corporan struck out but reached on a wild pitch with one out in the 10th and J.D. Martinez followed with a double. Pena then launched the first-pitch homer off Michael Gonzalez (0-3) to the second deck in right field.
It was a sloppy game that featured six unearned runs and four errors.
Hector Ambriz (2-4) pitched a scoreless 10th to help Houston take two of three in the series.
Corporan tied it with a solo home run in the eighth. Matt Dominguez added three hits.
The Brewers led by a run before Jonathan Lucroy's homer in the sixth, which bounced on top of the low wall in right field, made it 4-2 and chased Lucas Harrell.
Houston got back within one when Martinez reached on an error by second baseman Scooter Gennett leading off the bottom half. Dominguez hit an RBI double with two outs that made it 4-3.
Milwaukee starter Yovani Gallardo allowed five hits and three runs - none earned - in seven innings. He has not permitted an earned run in 21 straight innings spanning three starts.
Jim Henderson replaced Gallardo for the eighth and immediately gave up the homer to Corporan.
Gennett was thrown out at home on a grounder for the second out in the ninth. Dominguez doubled to lead off the ninth and reached third with one out, but John Axford retired the next two batters to send it to the 10th.
Carlos Gomez doubled to start the Milwaukee eighth before a peculiar error on second baseman Jose Altuve. He missed catching the ball on a pickoff attempt, allowing Gomez to take third.
Altuve immediately looked down at his glove and ran to the Astros dugout. Television shots showed that his mitt had come apart, leaving a big hole in it that allowed the ball to get through. An Astros official tied it back together and he returned to the field.
Astros center fielder Justin Maxwell dropped a fly ball hit by Caleb Gindl that sent two runs home in the second for a 3-0 lead.
Houston right fielder Trevor Crowe injured his right shoulder crashing into the wall attempting to catch the home run by Lucroy and left the game. He was listed as day to day.
NOTES: Houston plays another one of its former NL Central rivals when it opens a three-game series with the Cubs on Friday. Dallas Keuchel is scheduled to pitch for the Astros against Matt Garza. ... The Brewers return home to begin a three-game series with Atlanta on Friday. Wily Peralta opposes Atlanta's Julio Teheran.