Petit lost his bid for a perfect game on Eric Chavez's pinch-hit single with two out in the ninth inning and then recovered to retire the final batter in the San Francisco Giants' 3-0 victory over the Arizona Diamondbacks on Friday night.