PHOENIX -- Troy Glaus' big bat had been silent when it was needed most.
Not on Friday night.
"Our starting pitchers have been doing a heck of a job keeping us in ballgames," Glaus said. "It's kind of our turn to help them out a little bit."
Shawn Green also homered and Javier Vazquez earned his fourth victory in his last four starts, allowing two runs on seven hits in seven innings. The loss snapped Pittsburgh's season-best three-game winning streak.
Glaus walked with the bases loaded in the first inning for one RBI, then smashed Oliver Perez's 0-2 pitch into the second deck down the left-field line to put Arizona up 4-2 in the third. Two batters later, Green hit a shot to right to make it 5-2.
Glaus entered the game hitting .189 with runners in scoring position.
"It's frustrating because those are the situations I want to be successful in," Glaus said. "Tonight was a better night. Hopefully it will carry over. But you can't drive in nine or 10 guys with one swing. It's a process."
Glaus' home run, which came on a slider over the plate, was the sixth-longest in the eight-year history of Bank One Ballpark.
"I don't know that I've ever seen a ball hit that far in this park," said Arizona manager Bob Melvin, who spent two seasons as bench coach with the Diamondbacks in 2001 and 2002. "You get it up in the upper deck there, it's a pretty good blow."
It was his ninth home run of the season, tying him with Derrek Lee of the Chicago Cubs for the National League lead.
Royce Clayton led off the third with a double, then Luis Gonzalez walked to set the stage for Glaus.
"It was two strikes," Glaus said. "I was just trying to put a good swing on it and try to get that guy in somehow, some way. The game was 1-1 at the time. We were trying to get runners in."
Vazquez (4-2) struck out eight, hit a batter and walked none. No batter had even a three-ball count against the right-hander who came to Arizona in the trade that sent Randy Johnson to the New York Yankees. In Vazquez's four straight victories, he has allowed a total of six runs in 31 innings, a 1.74 ERA.
"I don't think Javy had his best stuff today," Melvin said, "but the sign of a true top-of-the-rotation guy is when he can go out there and still give you seven innings like he did."
Pirates manager Lloyd McClendon was ejected by first-base umpire Tim McClelland in the top of the eighth inning.
"I asked him if he saw the play," McClendon said. "He said yes, so I waved my hand and he threw me out. That may the first time in the history of the game that a manager gets thrown out of a game for waving his hand. He actually said 'I threw you out of the game because you disrespected me.' That's a new one on me."
Arizona ended Perez's night in the sixth with RBI singles by Luis Terrero and Alex Cintron.
Perez (1-4) gave up eight runs on 10 hits in 5 1/3 innings, striking out one and walking two. The 23-year-old left-hander has allowed 14 runs in 10 1/3 innings in his last two starts.
"Really the pitch that cost him the game was the hanging slider to Glaus," McClendon said. "Other than that, I thought he threw pretty decent for the most part. We've just got to get him down in the zone, got to get him to hit his spots. When he does that, he'll be fine."
Pittsburgh's Matt Lawton hit a two-out homer off Mike Koplove in the ninth.
The Diamondbacks loaded the bases with no outs in the first inning, but came away with only one run. Cintron and Clayton singled, then Gonzalez was hit by a pitch. Glaus walked to bring in a run, but Tony Clark bounced into a fielder's choice, Green struck out and Chris Snyder popped out.
The Pirates tied it at 1 in second when Daryle Ward singled, Wilson was hit by a pitch and Rob Mackowiak had an RBI single.
Pittsburgh cut the lead to 5-2 when Wilson doubled, advanced to third on a fly out to center, and scored when Jose Castillo grounded out.
Wilson left the game after injuring the middle finger of his left hand when he doubled in the fourth. ... Arizona manager Bob Melvin broke up the "G-Force" trio of Gonzalez, Glaus and Green for the first time this season, dropping Green to sixth in the batting order, behind Clark. ... Arizona is 3-2 on a 10-game home stand, Pittsburgh 3-2 on its 10-game road trip.