The Pirates scored five of their runs off home runs, including a controversial one by Freddy Sanchez off the left-field wall's yellow line in the first inning.
The hit was originally ruled a double, but after the umpires conferred on the field, the call was changed to a home run.
"They said they heard a sound, and they thought it hit above the yellow line," said Astros manager Cecil Cooper, who went onto the field to argue the call. "That's not what my eyes told me. He said he heard the sound like it hit the bottom of the rail. There was a distinctive sound, I did hear that part. But sometimes you hit that sign that's up there too and it will make that sound."
That home run ended up making little difference in the game. The Pirates left just four men on base on 11 hits, only going hitless in the sixth, eighth and ninth innings.
The Astros, meanwhile, went completely hitless until the fourth frame, in which they left two on after getting two hits. Pittsburgh pitcher Paul Maholm had a perfect game going until then.
"He's a pretty good young left-handed pitcher, and I thought he pitched well tonight," said Cooper. "He kept the ball down. I thought he mixed his pitches well, and we didn't swing the bat really well."
Lance Berkman singled in the seventh off Maholm, then scored on a single by Hunter Pence.
The offense appeared flat against Maholm, who threw 108 pitches in eight innings. He walked one and struck out five.
"It felt like the ball wasn't bouncing our way," Pence said. "We hit balls hard all over the map -- Lance smokes a line drive that they make a great play on [in the first], balls hit right at people, bouncing off the pitcher and going to the infielders. I felt like it just didn't click today."
The Pirates' Nate McLouth and Ryan Doumit both homered. Doumit's three-run shot off Tim Byrdak in the eighth put the Astros in an eight-run hole.
After being recalled from Triple-A Round Rock on Monday night, Jack Cassel allowed five runs on nine hits in 4 2/3 innings in his first start for the Astros since June 1. He gave up two home runs and stuck out two.
Cooper was happy with the youngster's changeup, but wanted to see better location.
"We had a good game plan, it pretty much came down to I didn't execute my pitches well enough," Cassel said. "I lacked consistency with my fastball command. I thought I had some good offspeed stuff working tonight, but in regards to not having that fastball command, they laid off some good pitches. ... The pitches that I did miss my location, they barreled them up."
Krysten Oliphant is an associate reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.