Updated

Andrew McCutchen had his major league-leading sixth four-hit game of the season and drove in three runs to lead the Pittsburgh Pirates past the Houston Astros 6-2 on Tuesday night.

Brock Holt added four hits in just his third major league start and Wandy Rodriguez (10-13) scattered four hits over seven shutout innings against his former team to help Pittsburgh snap a four-game losing streak.

Jordan Lyles (3-11) gave up five runs — four earned — in 4 2-3 innings for Houston, which failed to win consecutive games for just the second time since the All-Star break.

The Pirates came in losers in 10 of their previous 13, including a 5-1 setback to the Astros on Monday.

It wasn't the way Pittsburgh envisioned opening a critical six-game homestand as it chases a playoff spot for the first time in 20 years.

McCutchen has been slumping of late, coinciding with Pittsburgh's dip in the standings. He batted .252 in August after a red-hot July in which he hit a scorching .446 to fuel the Pirates' rise to playoff contention.

The All-Star center fielder snapped out of it in a big way while boosting his average to .347, moving ahead of suspended San Francisco outfielder Melky Cabrera for the best in baseball.

McCutchen and Holt helped the Pirates jump on Lyles early to give Rodriguez some breathing room. The veteran left-hander — acquired in a trade with the Astros on July 24 — shook off a bumpy start to win for the third time in his last four starts and lower his ERA to 3.71.

Pittsburgh manager Clint Hurdle worried Rodriguez tried too hard to validate the deal when he first arrived in Pittsburgh. Rodriguez earned a no decision against his old club in his first start as a Pirate four days after being dealt then went on to lose his next three starts.

A win in relief during a 19-inning marathon in St. Louis on Aug. 19 seemed to get Rodriguez back on track, and he's been arguably Pittsburgh's best starter the last three trips through the rotation.

Pittsburgh needed him to be a stopper on Tuesday after Monday's loss dropped the Pirates 2½ games back of St. Louis for the National League's second wild card spot.

Rodriguez looked a little shaky early on following a 75-minute rain delay. Jose Altuve singled to lead off the game then stole second. Justin Maxwell walked with two outs, but Jason Castro grounded to short and from there Rodriguez cruised. Houston never got a runner to third over Rodriguez's final six innings.

Lyles wasn't so fortunate.

McCutchen put the Pirates up 1-0 in the first on an RBI double. Two innings later he gave Pittsburgh a 2-0 lead when he singled home Holt. Garret Jones followed with an RBI single of his own to make it 3-0.

Pittsburgh added three more in the fifth as the worst team in baseball self-destructed. Holt doubled with one out and came home on a McCutchen single one batter later. Fernando Rodriguez relieved Lyles and after a walk to Garrett Jones got Pedro Alvarez to pop up to the left of second base.

One problem. Altuve, who was at second, and shortstop Tyler Greene couldn't decide who was going to catch it. The two players bumped into each other just as the ball caromed off Greene's glove. Two runs scored and the Astros were finished.

NOTES: Walker is on track for a possible return by the weekend. Walker hasn't played since Aug. 26 due to a balky back ... Pirates 3B Pedro Alvarez was named the NL Player of the Week after going 11 for 24 (.458) with four home runs .. The series wraps on Wednesday. Houston's Fernando Abad (0-2, 4.83 ERA) faces Pittsburgh's Kevin Correia (9-8, 4.40).

___

Follow Will Graves on twitter at www.twitter.com/WillGravesAP