HOUSTON - A.J. Burnett allowed one run in eight innings for his 16th victory, and Josh Harrison tied a career high with four hits to jumpstart Pittsburgh's offense in an 8-1 victory against Houston on Sunday to avoid a sweep.
The victory snapped a five-game skid for the Pirates, who at 75-77 are in danger of posting their 20th straight losing season, which would extend their major North American professional sports record.
They have won just three times in the past 16 games to make their chances of securing the second NL wild-card slim.
A.J. Burnett earned his 16th victory as the Pirates downed the Astros, 8-1.
Burnett (16-8), who allowed four hits and struck out a season-high 11, won for the first time since Aug. 16 to become the first Pittsburgh pitcher to win more than 15 games since 1991. He had started six games with four losses between victories.
Harrison provided the spark manager Clint Hurdle was looking for in the lineup, and Jose Tabata drove in two runs as the Pirates had a season-high 18 hits. Their eight runs were six more than they scored in the first two games of the series combined.
Scott Moore had a solo homer in the sixth, and had three of Houston's four hits to come a triple short of the cycle.
Houston starter Jordan Lyles (4-12) pitched four scoreless innings before running into trouble in the fifth. Alex Presley and Harrison singled before Andrew McCutchen walked to load the bases and chase Lyles.
Lyles allowed six hits and three runs with four strikeouts to fall to 0-4 in five career starts against the Pirates.
Wesley Wright came on for Lyles and hit pinch-hitter Gaby Sanchez to send a run home and put Pittsburgh up 1-0.
Wright was lifted for Mickey Storey with one out, and Storey walked pinch-hitter Pedro Alvarez on four pitches to score another run.
Clint Barmes and Rod Barajas hit consecutive RBI singles to push Pittsburgh's lead to 4-0.
Harrison singled before scoring on a double by McCutchen made it 5-0 in the sixth inning.
Moore doubled in the first inning and Houston didn't get another hit until his single with two outs in the third inning. Jose Altuve walked and stole second base in the third, and was out at home on Moore's single.
Pittsburgh added three runs in the eighth on RBI singles by Alvarez, Tabata and Burnett.
Burnett's performance continued a streak of 26 straight starts where he pitched into the sixth inning or longer.