Nate McLouth's two-run single in the eighth capped a three-run rally and Pittsburgh sent the Astros to their seventh loss in eight games with a twice rain-delayed 4-3 win Tuesday night.
McLouth's line drive to right on a 3-2 pitch off Doug Brocail (4-4) scored Jose Bautista and pinch-runner Luis Rivas. Adam LaRoche, who went 3-for-4, hit his 10th homer earlier that inning, starting the rally with two outs.
"It was a miserable night until the end there when we came out and won it," said McLouth, who also homered Tuesday. "It certainly makes it a lot easier to go home and go to sleep than it would have if we wouldn't have won."
The rain delays totaled 3 hours and 7 minutes -- once in the top of the fourth for 2 hours and 39 minutes and again less than an hour later during the bottom of the sixth, when play was halted for 28 minutes.
"It was a long night," Pirates manager John Russell said. "The guys stayed as loose as they could and tried to be as ready as you can. It's a tough night for everyone. But when you play a game like this, it's always great to come out on top."
Hunter Pence and Carlos Lee hit home runs to account for the offense for Houston. Lance Berkman walked four times and Brad Ausmus reached base four times for the Astros, who lost a 17-inning game Sunday in Atlanta and blew two leads in a defeat to Pittsburgh Monday.
"We've had three pretty long days," Astros manager Cecil Cooper said. "It's been a little difficult for us."
John Grabow (5-2) pitched two scoreless innings to earn the victory and Damaso Marte pitched the ninth for his third save.
"It didn't really matter if we didn't do too much tonight," said Pirates starter Ian Snell. "We did enough."
Lee, who extended his hitting streak to 11 games, homered for the second time in as many games with his rocket shot to the deepest part of the park in left-center with Berkman aboard in the fifth. It was his 21st of the season.
Pence's solo shot, his 11th, came with one out in the fourth, with a heavy wind heading straight out of the park and a storm just about to hit. The area was under a severe thunderstorm watch.
The following two batters reached against Snell, ending his return to action after a stint on the disabled list prematurely after 3 2/3 innings. While reliever T.J. Beam was warming up, umpire crew chief Wally Bell called the grounds crew in for the first time.
Snell was charged with one run on four hits and three walks with one strikeout in 3 2/3 innings. He had been suffering from medial epicondylitis in his right elbow.
"I thought he threw the ball well," Russell said. "A little rusty, but he was throwing hard, he was attacking the zone. His pitch count got up; they hit a lot of foul balls off him. But his command was pretty good."
Rain began to fall again shortly after play was resumed for the first time, picking up in intensity in the sixth. McLouth hit a solo shot, his 17th and second in as many games, in the bottom of the fifth.
"That's why we call him Nate the Great," Snell said. "He comes through in clutch situations."
McLouth's homer wasn't as clutch as his eight-pitch at bat in the eighth with the bases loaded in which he fouled off three Brocail fastballs.
"That's a ballgame we should have we won," Brocail said. "The tough thing is, when you blow a lead and blow a save, all the hard work that the guys prior to you went through doesn't amount to anything."
The game ended at 1:10 a.m. ET. Berkman tied a team record for walks in a nine-inning game. Houston's bullpen has pitched 19 2/3 innings the past three days.