PITTSBURGH (AP) -- Without a hit in the majors in almost five months, Jason Jaramillo took a simple approach when he came up as a pinch hitter in the eighth inning of a tie game.
His grounder through the hole at second enabled Andrew McCutchen 's multi-homer game to count for a win.
McCutchen hit his 21st and 22nd home runs, Jaramillo singled home pinch-runner Chase d'Arnaud for the go-ahead run and the Pittsburgh Pirates beat the Houston Astros 5-4 on Wednesday night, giving Clint Hurdle his 600th career managerial victory.
"I was just looking for a good pitch out over the plate," said Jaramillo, who was on Pittsburgh's opening day roster but spent most of the season in Triple-A or injured. "I know in that situation you hear that a lot, but honestly, I was just trying to stay as quiet as possible, and it worked out. I got a pitch out over the plate and just put a good swing on it."
McCutchen hit a solo homer in the first after Houston had taken a 3-0 lead and a three-run shot in the fifth to tie the game at 4.
"It was a good night for him," Hurdle said of McCutchen. "He basically jump-started the whole offense."
Carlos Lee , Matt Downs and Clint Barmes homered for the Astros, who have lost five of six.
The Pirates' bullpen combined for 5 2-3 innings of scoreless relief, with Tony Watson (2-2) getting the final out in the eighth and Joel Hanrahan working a perfect ninth for his 36th save in 39 opportunities.
Garrett Jones and Ryan Doumit hit consecutive pinch-hit singles with one out in the bottom of the eighth off Wilton Lopez (2-6). Jaramillo then produced the only run of the game that did not come on a home run.
"That was a good piece of hitting," Hurdle said of Jaramillo's opposite-field hit.
Lee and Downs hit consecutive homers off Brian Burres in the first, the second time this season the Astros hit back-to-back shots.
Lee has 15 homers, but four have come in his past 14 games. Downs made it two Burres pitches, two home runs to left, when his line drive struck the foul pole.
"We went up early," said Downs, "but there was a lot of game left when we went up.
"When you go up early, there's a lot of game left to fight back, so it's just one of those nights."
Barmes hit a solo shot in the fourth, his 10th, giving last-place Houston its second three-run lead.
"That was our game to win," Astros manager Brad Mills said. "We've had a few tough ones to lose, and that definitely is one of them."
McCutchen tied it in the fifth when he connected against J.A. Happ. It was his fourth career multihomer game and second this season. McCutchen has a career-high 22 home runs. Both of his shots Wednesday came on the first pitch.
"You don't want to not ready until after the first pitch; you want to be ready every single pitch," McCutchen said. "That's my thought process - be ready. And he grooved me a couple fastballs, and I was able to hit them out."
Making his third start since a three-week stint in the minors during August, Happ gave up four runs on five hits and four walks in five innings. He tied a season high with eight strikeouts.
Happ had allowed one earned run in his two previous starts since bring promoted back to the majors. He also hadn't allowed more than three runs in any of his previous seven career starts against Pittsburgh.
Making his second start since being promoted from Triple-A, Burres allowed four runs on seven hits in 3 2-3 innings.
"I had some command issues, pretty much, with all the pitches," Burres said. "And I left some out over the fat part of the plate, and they got hit pretty hard."
Notes: Hurdle, who kept the ball from his milestone victory, said LHP Jeff Locke will make his major league debut when he starts Saturday's game against Florida. RHP Charlie Morton will, in effect, have his turn in the rotation skipped as he deals with late-season fatigue. Hurdle also said the team could, at times, go with a six-man rotation the rest of the season. ... Pittsburgh RHP Jared Hughes made his major league debut, allowing one hit in 1 1-3 scoreless innings. ... Astros RHP Bud Norris has 34 strikeouts in 29 1-3 innings over his past five outings. He starts Friday in Washington. ... The Pirates begin a three-game series against the Marlins on Friday. Pittsburgh was swept in Florida in April, and was shut out in two of the three defeats.