SAN FRANCISCO -- The D-backs ran into Yusmeiro Petit on Friday night. The former D-back was nearly perfect against the team for which he played three years, retiring the first 26 hitters he faced before allowing a single to Eric Chavez with two outs in the ninth.
The Giants won the game, 3-0, and the D-backs were virtually helpless against Petit.
"I was just trying to get the best at-bat I could," Chavez said. "I think around the fifth, I came up here to see what he was doing, because I had a feeling I was going to pinch-hit at some time during the night. I didn't know it would be with two outs in the ninth. I had never faced him and he was locked in."
History nearly repeated itself. The last time the D-backs were no-hit was seven years ago Friday, by Anibal Sanchez of the Marlins.
"I was thinking, 'Someone get on base,'" D-backs manager Kirk Gibson. "I put him [Chavez up there], because he has a lot of experience. He was the guy for the job. My thought is, 'He's pitched a great game, now let's break his heart.'"
Chavez worked the count full before getting the hit.
"That was a real good at-bat by him," Giants catcher Hector Sanchez said. "He took some good pitches down in the zone. On the 3-2 count, he threw a fastball, a good pitch on the the outside corner, and he hit it good."
Patrick Corbin (13-6) pitched well enough to win just about any other night. He allowed three runs on eight hits over eight innings. He walked one and struck out five.
"I know it's going on and you just try and get something going and you still go out there and pitch your game and try not to worry about what they are doing," Corbin said.
The Giants scored single runs in the second and fourth, with Corbin limiting the damage in the second and getting help from his defense to escape the fourth.
After Hunter Pence doubled to open the fourth, Adam Eaton made a diving catch in the left-field gap to rob Pablo Sandoval of extra bases and Paul Goldschmidt snared a line drive that was headed for the right-field corner, taking away extra bases from Joaquin Arias.
Pence hit a solo home run in the eighth inning.
Corbin rebounded from two of his poorer efforts the last two times out. He had allowed 13 earned runs in his previous 10 1/3 innings.
"I felt better coming in and out with my fastball," he said. "I was able to locate my offspeed stuff. They got some hits on me and some early on and I thought I had settled down. I felt the best in the final two innings."
Until the ninth, the closest Arizona came to a hit was Corbin's sinking line drive to left that Juan Perez caught for the final out of the sixth with a headfirst dive.
"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."
Rick Eymer is a contributor to MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.