As their game against the Orioles slowly degenerated into glorified batting practice, the Astros allowed themselves to wonder if all nine players in the lineup would get a home run Wednesday night.

The Astros were in a slugging mood while joyfully pounding each other in the dugout after roughing up the Orioles for an 11-7 victory with six home runs at Minute Maid Park, but Baltimore’ bats woke up just in time to make it stressful at the end.

“That was awesome,” said J.D. Martinez, who hit the sixth homer and the third of the four-run fourth inning. “We kept talking about it. All we needed was three more, and the whole lineup would have hit a home run. Not that that has ever been done, but that was pretty cool.”

Baltimore scored six runs over the seventh and eighth innings, prompting the Astros to use closer Jose Veras to protect a four-run lead in the ninth.

The Astros’ offense gave the crowd of 15,526 an impressive power display with the second-best home run barrage in the franchise history, but the Orioles jumped on relievers Paul Clemens and Travis Blackley for six runs after Dallas Keuchel exited.

Righthander Hector Ambriz relieved Blackley with the bases loaded in the eighth, allowing only one inherited runner to score before handing it over to Veras for a non-save situation in the ninth.

“That’s what you call a good old fashioned American League baseball,” Astros manager Bo Porter said.

Beginning with Jason Castro’s two-run blast in the first inning, the Astros combined to hit six home runs for the first time they hit six on Aug. 9, 2006, against the Pittsburgh Pirates. The franchise record for home runs in the game was set on Sept. 9, 2000, when they hit seven against the Cubs.

“The offense took a lot of pressure off me,” Keuchel said after holding the Orioles to five hits and one run with two walks and three strikeouts over six innings in the victory. “I didn’t feel really good today command-wise, but after Castro hit that home run in the first I kind of took a step back and was like, ‘All right, just buckle down and try to get some quality outs.’”