PITTSBURGH -- An eighth-inning rally earned Wandy Rodriguez a well-deserved victory.
Rodriguez allowed two runs over seven innings to win his fourth consecutive start against the Pirates and the Houston Astros scored twice in the eighth to snap a two-game skid, 3-2 over the Pittsburgh on Friday night.
Rodriguez (2-3) was coming off a no-decision in which he pitched eight shutout innings -- the second time in six prior starts this season he'd gone at least seven innings and allowed less than two runs but still did not earn a win.
|More on Astros at Pirates|
Rodriguez left Friday's game trailing 2-1 but Carlos Lee and Hunter Pence delivered RBI hits in the eighth to turn a loss into a victory.
"He's just in a rhythm, he's got great command of three pitches and he works fast," said Pence, who had two hits with two RBI. "It's a joy to play behind him and I'm glad we got him a win. It's good to finally get him a win; we haven't given him enough support, but he's a great pitcher."
Rodriguez (2-3) faced the minimum through 4 2/3 -- allowing only a walk and a single, but both were erased by double plays. Pittsburgh hit back-to-back two-out doubles in the fifth to tie it at 1.
Lyle Overbay doubled off the right-field wall and Wood followed by lining one down the left-field line.
Rodriguez's only other mistake was to Neil Walker, who led off the bottom of the seventh by hitting a full-count pitch into the seats just beyond the left-field wall to give Pittsburgh a short-lived lead.
"He was locating his fastball to both sides of the plate and had a good over-the-top curveball," Walker said of Rodriguez. "He did a good job."
For his part, Rodriguez said he never truly felt comfortable on a day in which it rained steadily - heavily at times - throughout much of the middle innings.
But when asked what was working in his pitch repertoire, Rodriguez said, "everything."
He needed to be good, because Houston managed only five hits over seven innings against Paul Maholm. But the first three batters of the eighth reached against a Pittsburgh bullpen that entered with the second-best ERA (2.63) in the National League.
Pence doubled in the tying run and Lee had the go-ahead RBI in the eighth.
Brandon Wood had two hits for the Pirates, who had won three of four.
Pittsburgh (15-17) missed out on a chance to improve to .500 this late in the season for the first time since 2005. The Pirates have a streak of 18 consecutive losing seasons -- a record for major North American professional sports.
Mark Melancon worked an eight-pitch ninth for his first major league save. Melancon, who inherited the closer's role when Brandon Lyon went on the disabled list Thursday, threw only one ball in the inning.
"Just getting first-pitch strike is obviously huge as a pitcher," Melancon said. "That's my main goal; from there I can start working my other stuff."
For the first time in 10 games, Pittsburgh allowed its opponent to score first. Four batters reached safely against Maholm, and Jason Bourgeois scored on Pence's sacrifice fly.
Maholm has allowed seven first-inning runs in seven starts.
Still, he left the game in line to become the all-time wins leader at 10-year-old PNC Park (32) until Chris Resop (1-1) began the eighth by walking Michael Bourn. Bourn stole second and scored on Pence's double.
Pence has 16 RBIs in 57 career at-bats against Pittsburgh.
Lee, who was playing for the first time in five days because of a bruised left rib cage, singled in Pence.
"I gave up one run, get over it, first inning," Maholm said. "I threw seven innings, one run. It doesn't really matter if it's the first or the fifth. Would I like to have a clean inning? Sure, but overall the results are what we are going for."
Pirates OF Jose Tabata returned to the lineup for the Pirates after missing the previous four games due to tightness in his right hamstring. ... Pittsburgh 3B Pedro Alvarez missed his second consecutive start after leaving Tuesday's game in San Diego with tightness in his right quadriceps muscle. ... Pirates RHP Ross Ohlendorf pitched a batting practice session Friday. Ohlendorf, on the disabled list since April 9 with a shoulder strain, did not experience a setback but also did not show enough arm strength to be sent on a minor league rehabilitation assignment. ... Bourgeois and Bourn entered the day tied with the New York Mets' Jose Reyes for the majors lead in steals - and each stole a base during the first inning. Bourn stole another in the eighth.