Giants right-hander Yusmeiro Petit flirted with fame Friday night taking a perfect game into the ninth inning against the D-backs at AT&T Park.

He lost it with two outs in the ninth on a looping single from Eric Chavez. He then retired the next hitter A.J. Pollock to finish the one-hitter and notch the victory for the Giants 3-0.

The D-backs barely challenged Petit in the first eight innings forcing him to throw only 81 pitches. Remarkably consistent Petit threw nine pitches in each of the first three innings 10 in the fourth 11 in the fifth and sixth and only six in the seventh.

The only two Arizona batters who came close to mustering a hit off Petit before Chavez were Paul Goldschmidt who was thrown out at first base after shortstop Joaquin Arias backhanded his sharp grounder to end the first inning and pitcher Patrick Corbin. Corbin hit a sinking liner to shallow left with two outs in the sixth which Juan Perez who entered before the inning as a defensive replacement for Brett Pill snagged with an all-out headfirst dive.

Petit began the ninth in theatrical fashion striking out Chris Owings on three pitches. Petit fell behind on the count to Gerardo Parra 2-0 before coaxing an easy grounder to second base.