Mets Pummel the Diamondbacks for the Third Win in Their Series

The Mets (75-70) have won the first three games of a pivotal four-game series to move past the Diamondbacks (75-71) in the race for the second National League wild card. The Mets entered Wednesday three games behind the Chicago Cubs, who played later Wednesday in San Diego.

Arizona has lost four straight since going 11-1 to move into the crowded N.L. playoff picture.

Steven Matz (10-8) tossed six scoreless innings for the Mets, who jumped on Ray (12-8) for five runs before chasing him with two outs in the first. Wilson Ramos (groundout) and J.D. Davis (single) had an R.B.I. before Frazier and Brandon Nimmo homered on consecutive pitches.

Matz allowed four hits and three walks while striking out seven. He issued all three walks to open the second before striking Carson Kelly and inducing a double-play grounder from Kevin Cron.

Ray gave up five hits and struck out one.

McNeil hit a solo homer in the second, and Frazier hit his 20th homer of the season, a solo shot, in the third. McNeil then joined Frazier in the 20-homer club with a two-run drive in the sixth.

The Mets have four players with 20 homers for the fourth time in franchise history. The rookie Pete Alonso leads the majors with 47, and Michael Conforto has 29.

Alonso coordinated the purchase and production of custom 9/11 cleats for Mets players on the 18th anniversary of the terrorist attacks. The shoes were painted red, white and blue and included “We will never forget” and the titles of emergency medical worker units. After winning the All-Star Home Run Derby in July, Alonso donated $50,000 of his $1 million prize to the Tunnels to Towers Foundation, which supports injured emergency medical workers and members of the military, as well as the survivors of those who die in the line of duty.

Both clubs also wore first-responder hats during batting practice, then lined up on their baselines alongside firefighters, police and E.M.T.s before the national anthem.