HOUSTON -- A.J. Burnett allowed one run in eight innings for his 16th win, and Josh Harrison tied a career high with four hits to jump-start Pittsburgh's offense in an 8-1 win over Houston on Sunday to avoid a sweep.
The win 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.
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.
NOTES: Zane Smith (16-10) and John Smiley (20-8) were the previous Pittsburgh pitchers to win more than 15 games in a season. ... Right-hander Bud Norris is scheduled to start for the Astros on Wednesday. But he could have his start pushed back, because he has flu-like symptoms and is still dealing with a blister on the index finger of his throwing hand. Houston interim manager Tony DeFrancesco hopes he feels better because he'd like him to make two more starts before the season ends. ... Houston opens a three-game series with St. Louis on Monday while the Pirates travel to play the Mets.