PHOENIX -- Luis Gonzalez has had a lot of big hits in his Arizona Diamondbacks career. Few have traveled less distance than his game-tying hit Monday.
Gonzalez had an RBI bunt single, Orlando Hudson drove in the go-ahead run with an eighth-inning sacrifice fly and the Diamondbacks held off the Pittsburgh Pirates 4-3 Monday night.
Trailing by three, the Pirates loaded the bases with none out in the ninth against closer Jose Valverde. After Ronny Paulino popped out, Jose Castillo hit a two-run single to cut the deficit to one. But pinch-hitter Jose Hernandez struck out and Nate McLouth flied out to end it.
"We needed one hit but we put ourselves in that position because we made mistakes and gave them four runs," said Pittsburgh manager Jim Tracy.
Shawn Green walked leading off the Arizona eighth against Damaso Marte (0-3), Damion Easley blooped a single to center and Johnny Estrada advanced the runners with a sacrifice bunt.
Hudson then hit a slicing fly to right field. Jeromy Burnitz chased the ball to the line, but it bounced out of his glove for an error as Green scored. Hudson was credited with a sacrifice fly.
"I firmly believe if the runner had had to tag it would have been a close play given his momentum running toward the infield and it wasn't a long throw to make," Tracy said.
Marte struck out pinch-hitter Tony Clark for the second out. But Easley and Hudson scored when Marte fielded Craig Counsell's high chopper to the right of the mound, spun and threw the ball down the right-field line for a three-base error.
Brandon Medders (1-1) pitched a scoreless eighth for the win, and Valverde got his 13th save in 14 chances.
Gonzalez tied the score with two outs in the seventh on his first bunt hit in more than a year, pushing the first pitch he saw from Marte down the third base line as Andy Green sprinted home. Pirates third baseman Freddy Sanchez barehanded the ball halfway between third and home but had no play at first.
"I asked (third-base coach Carlos) Tosca which way Marte fell off the mound," Gonzalez said. "I saw him through a couple of pitches to (Eric) Byrnes and thought I could get one down if the third baseman was back."
Green led off the inning with a walk, went to second on a sacrifice and moved to third on a grounder.
"(Tosca) told me to look for it," Green said. "That's pretty good base coaching right there when he tells the base runner the cleanup hitter might lay down a bunt."
Arizona manager Bob Melvin said the bunt wasn't called from the dugout.
Jason Bay gave the Pirates a 1-0 lead when he drove Orlando Hernandez's first pitch of the second inning about 12 rows up into the left-field stands for his team-leading 10th home run.
Gonzalez's bunt hit negated a strong outing by Pittsburgh starter Oliver Perez, who threw six scoreless innings. Perez allowed four hits with three walks and four strikeouts.
The Diamondbacks loaded the bases against Perez in the first when Counsell singled, Gonzalez hit a one-out double and Perez hit Conor Jackson with a pitch. But the left-hander recovered to retire Shawn Green and Easley to end the inning.
Hernandez, who left his previous start Tuesday after two-plus innings with a back strain and sore knee, gave up six hits over seven innings and let just one runner other than Bay reach third base. Hernandez walked three and struck out nine, matching his season high.
"He threw a good game and kept us off balance," said Sanchez, whose 12-game hitting streak was snapped. "He kept me off balance."
Gonzalez's bunt single was his first since April 4, 2005. ... Perez has pitched into the seventh inning once in nine starts. ... The game was played in front of an announced crowd of 18,103, the second-smallest crowd in Chase Field/Bank One Ballpark history by 85 people. ... The crowd cheered when the Suns-Clippers playoff game was shown on the video board during the seventh-inning stretch and booed when the Diamondbacks came to bat and the basketball game was turned off. ... Bay has hit safely in 18 of 19 games in May. ... The Diamondbacks turned a double play in the third inning to extend their club record of games with a DP to 13. ... Arizona 3B Chad Tracy was out of the lineup for just the second time this season with the left-handed Perez on the mound.