Brett Myers pitched into the eighth inning to earn his first win in 2½ months and the Houston Astros beat the Pittsburgh Pirates 4-1 on Tuesday night.

Myers (4-13) allowed one run and four hits over 7 2-3 innings at soggy, chilly PNC Park as last-place Houston snapped a four-game losing streak. The right-hander had lost seven consecutive decisions since he pitched a four-hitter in a 7-3 victory at the Los Angeles Dodgers on June 17.

"I just try to go out there and give quality starts," Myers told "If I get a win, I get a win. I'm trying to help the ballclub win games, but it's always good to get a win for myself, too."

Catcher Humberto Quintero had three RBIs and Jimmy Paredes finished with three hits for the Astros, who have four of their last five against Pittsburgh but are 2-9 in their past 11 against everyone else.

Ryan Doumit homered for Pittsburgh, which has lost two of three and seven of 10.

Information from the Associated Press used in this report