NEW YORK — R.A. Dickey baffled the Diamondbacks with his knuckleball, pitching shutout ball into the ninth inning to lead the New York Mets over Arizona 3-1 Sunday.

Dickey (4-1) allowed four hits in eight-plus innings, struck out four and walked four, coming within three outs of what would have been his third career shutout.

Gerardo Parra, who had two of Arizona's four hits, drew a leadoff walk in the ninth and scored on Justin Upton's double. After Dickey left to a standing ovation, Jason Kubel flied out to the left-field warning track against Tim Byrdak.

Paul Goldschmidt struck out against Frank Francisco in a nine-pitch at-bat and Miguel Montero flied out to the right-field warning track. Francisco earned his seventh save in eight chances.