HOUSTON — The Milwaukee Brewers did so many things wrong on Thursday that manager Ron Roenicke termed it their worst game of the season.

"That's as bad as it gets," he said. "Sometimes we might lose big, or we may not pitch well, but all the things we did wrong in that game, that's a bad game."

Carlos Pena hit a three-run homer in the 10th inning, giving the Houston Astros a 7-4 win over the Brewers.

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.

"Defensively, we gave them a couple of runs early, and we didn't do the job offensively when we had guys on third base," Roenicke said. "Pitching was OK. You go long enough in a game, and somebody is going to give us something. But that was a bad game. We didn't do a lot of things right in all areas."

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.

It was little consolation to Lucroy, who was unhappy about Milwaukee's many missed opportunities to score late.

"We just beat ourselves today," he said. "You have to be able to get runs in with runner on third with less than two outs. You have to go up there and at least make contact — and I am talking about myself, striking out.

"So, team-wise, we didn't hit, we pitched pretty decent, but we didn't get a hit when we needed to and our defense wasn't good at all, and I am talking mostly about myself."

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.

Gallardo didn't exactly let his defense off the hook for struggling in this one.

When asked if the mistakes on defense bothered him he said: "Not really; maybe a little bit."

Then he backtracked a bit saying that it's part of the game.

"I know for a fact the guys behind me don't want to make errors," he said. "They want to get every out they can. That is just how it is. As a pitcher, you have to move past it, whether it's an error or a misplayed ball. You have to focus on the next guy."

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. Crowe was placed on the 15-day disabled list after the game.

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.