PITTSBURGH – Considering all the hardship the Astros, their fans and the city of Houston had been through during the past week, lefthander Randy Wolf was pitching with anything but pressure Friday night.

Wolf, unlike his previous start five days earlier against the Chicago Cubs, was working with a full night of rest and knew he needed to return to form in what was pretty much a must-win for the Astros.

Behind an offense that finally registered a pulse, Wolf helped the Astros snap a five-game losing streak by throwing seven strong innings in a 5-1 win over the Pittsburgh Pirates at PNC Park.

“The monkey on your back gets bigger and bigger the more you don’t win,” Wolf said. “We’re pretty much at a time of complete urgency where we pretty much have to win every game from here on out to give ourselves a chance. It feels like it’s been a while with everything we’ve gone through.”

“It’s been a long week, man, and a long time since we’ve had one,” manager Cecil Cooper said of the win.

It was the Astros’ first win since polishing off a four-game sweep of the Pirates with a 6-0 victory at Minute Maid Park on Sept. 11. The win assures the Astros of finishing with a .500 record or better for the 15th time in the past 17 seasons.

“It feels good to get a win,” said right fielder Hunter Pence, who went 2-for-2 with two walks and three RBIs. “To have the kind of pitching performance Randy Wolf had just set the tone for us.”

Wolf (11-12), who lasted only 2 2/3 innings Sunday against the Cubs at Milwaukee’s Miller Park, held the Pirates to three hits and one run while striking out seven. The Astros are 9-2 in games he’s started this year.

“Usually the night before I pitch I get a little more than two hours (of sleep) and usually I don’t have to haul my suitcase down 14 flights of stairs,” Wolf said. “There was a better routine. The team flew me up early because we were getting in (early Friday morning), and I was able to get a good night’s sleep. You get those things on your side (and) it makes things a little bit easier.”

Pirates starter Ian Snell (6-12) held the Astros to three hits and two runs (one earned) in six innings, but was hurt by five walks.

Lance Berkman drew his second walk of the game with one out in the fourth, and Geoff Blum followed with another walk. Pence then singled to left-center to score Berkman and break the Astros’ 0-for-23 drought with runners in scoring position.

“I was figuring I was going to get some sliders there and I was trying to go to right,” Pence said.

An errant throw by third baseman Andy LaRoche to try and cut down a sliding Berkman at the plate allowed Blum to take third and Pence move to second. Blum scored on Ty Wigginton’s grounder to make it 2-0.

Adam LaRoche got Pittsburgh within 2-1 with a homer off the top of the wall in left-center with two outs in the fourth, but the Astros scored three times in the eighth to take a 5-1 lead.

Blum had an RBI single that caromed off first base and sailed high enough in the air to allow Kaz Matsui to score from second. Pence added a two-run double to cap the scoring.

“We just haven’t been able to get big base hits, and tonight we were able to get big base hits, especially in the eighth inning to kind of open things up a little bit,” Cooper said. “We were a little bit more patient and some of our at-bats were a lot better.”