SAN FRANCISCO (AP) -- Eric Chavez thought he would make a pinch-hit appearance. He never imagined it would be under these circumstances.
Chavez's two-out single broke up Yusmeiro Petit's bid for a perfect game and was Arizona's only hit in a 3-0 loss to the San Francisco Giants on Friday night.
"I had never faced him before, so I came up to watch him pitch in the fifth and he was throwing the ball well," Chavez said. "I kept asking guys what he throws. He could have thrown any pitch in any count and that was in the back of my mind."
Petit (3-0) retired the first 26 batters in a remarkably efficient performance, and then got two strikes on Chavez before unleashing a tempting curveball. But the veteran third baseman laid off that 2-2 curveball that Petit was certain he would chase.
"I don't know," Chavez said when asked why he stayed away from the close offering. "I wasn't trying to break his heart, I was trying to break it up. It's a pride thing."
Chavez lined the next pitch to right field and Petit crouched as the ball left the bat. The Venezuelan pitcher put both hands over his head after Hunter Pence could only short-hop the ball after a valiant diving effort.
"The last two outs, it can go either way," Petit said through an interpreter. "I went to 3-2 count. I just wanted to throw a good pitch. Chavez got the hit."
The crowd of 41,190 fans responded with a standing ovation for Petit, who struck out seven in his 95-pitch gem. A.J. Pollock grounded out to third to finish Petit's first career complete game.
Before the ninth, the closest Arizona came to a hit was Corbin's sinking line drive to left that forced Juan Perez to make a shoestring catch for the final out of the sixth. Petit got through the eighth in 16 pitches, including an eight-pitch at-bat against Miguel Montero.
"I'm just glad I hit the ball and put it in play," Corbin said. "I was hoping it would fall in. They were playing some good defense behind him as well."
Corbin (13-6) tossed eight strong innings, giving up eight hits. He walked one and struck out five.
Petit broke into the majors in 2006 with the Marlins, and then spent the next three years with Arizona. He was waived after the 2009 season and eventually landed in San Francisco.
He was designated for assignment twice this season but stuck with the Giants and has won each of his three starts since being called up late last month to make a case for a roster spot next season.
"Just a beautiful game," San Francisco manager Bruce Bochy said. "A tremendous display of pitching. He was pounding the strike zone all day with all his pitches. He's fought his way to get back up here. He was up here earlier and went back to Fresno. He's just done a tremendous job and he's trying to send a message that this is where he belongs and where he should be pitching."
Petit, making his 40th career start, needed 65 pitches to get through seven innings. The right-hander went to a three-ball count twice and did not throw more than five pitches to any one batter through seven.
Pence singled and scored on an error by shortstop Chris Owings in the second. He doubled and scored on Hector Sanchez's base hit in the fourth. Pence then hit a drive to left in the eighth for San Francisco's first homer at home since Aug. 21.
Sanchez went 3 for 3 and also was behind the plate for Petit's best start of his career.
"We had a good plan," Petit said. "We had good communication through the whole game."
NOTES: RHP Brandon McCarthy (3-9, 4.94) gets the start Saturday for the Diamondbacks. He's coming off his eighth career complete game. ... The gametime temperature of 72 degrees made it the hottest night game of the season in San Francisco.
© 2013 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.