The Astros erupted for six home runs -- by six different players -- and got another quality start from left-hander Dallas Keuchel before holding off a late Orioles surge to win for the seventh time in eight games, 11-7, at Minute Maid Park.
"Everybody hit the ball hard tonight," left-fielder J.D. Martinez said. "You felt like you needed headphones or earplugs in the dugout, because everybody was hitting the ball hard, and hats off to everybody that was working in the cage and stuff."
Castro and Pena hit two-run homers in the first inning and Marwin Gonzalez had a solo blast in the second to make it 5-1. The Astros hit three homers in the fourth -- solo shots by Matt Dominguez and Jose Altuve and a two-run homer by Martinez. The six homers traveled 2,379 feet.
The game marked the ninth time in team history the Astros hit as many as six home runs in one game, and they had reached that total by the fourth inning. The club record is seven homers, set on Sept. 9, 2000, against the Cubs at Wrigley Field.
"That's what you call good old-fashioned American League baseball," manager Bo Porter said. "I tell you what, that's a good ballclub they have over there. To battle the way they battled after getting down early, that's a credit to their guys and Buck Showalter and his staff."
The Orioles, who lead the Majors in home runs, added a pair of long balls -- a solo blast by J.J. Hardy in a three-run seventh and a two-run homer by Matt Wieters in a three-run eighth -- that allowed Baltimore to cut the lead to 11-7 and put a scare into Houston.
Reliever Hector Ambriz got Hardy to ground into an inning-ending double play with the bases loaded in the eighth to escape a jam in which the Orioles had the tying run at the plate. Closer Jose Veras handled the ninth.
"Even though it was a four-run lead, I did not want them to get anything started in the ninth and then bring Veras into a situation where there's already action on the bases," Porter said. "I told [pitching coach] Doug [Brocail], 'No, we're going to go ahead and end this thing right here.'"
Keuchel (3-2) won his second consecutive start and for the third time in his last four starts by allowing one run and five hits in six innings, lowering the ERA of Astros starters to 3.17 in the last 20 games. The Astros are 4-2 in his six starts.
"The offense took a lot a pressure off me," Keuchel said. "I really didn't feel too good today command-wise, but after Castro hit that home run in the first, I kind of took a step back and said, 'All right, just buckle down and try to get some quality outs.'"
Orioles starter Freddy Garcia (2-3) was rocked for six runs and seven hits, including four home runs, in three-plus innings of work.
"They were aggressive tonight," said Garcia, who was signed and developed by the Astros. "They were swinging at every pitch, I guess. And they made contact with them. And in this ballpark, when the roof's closed, the ball flies. But four home runs is four home runs. Doesn't matter where you hit it. I guess I've got to do a better job."
It was only the second time in Astros history six different players homered in the same game. The only starters who didn't homer were Brandon Barnes, Carlos Corporan and Trevor Crowe, and Barnes and Corporan both hit balls high off the outfield wall.
"We just come here and do our work," said Corporan, the switch-hitting catcher who went 3-for-3 with two runs scored. "We've got good talent here. Our record doesn't show it, but we've got pretty good talent in this room. We've been putting the ball in play more and getting better at-bats as well from everybody, including myself. That's something good."
Keuchel had retired 12 in a row when the Orioles rallied in the sixth, loading the bases with two outs. He struck out Danny Valencia on a backdoor slider on his 100th and final pitch of the game.
"I thought Dallas did a good job," Porter said. "Even a couple of times when he did get in trouble, he made quality pitches to get out of the jams and hold their lineup at bay."