NEW YORK -- Justin Wilson watched Mets first baseman Pete Alonso dive for Ketel Marte's line drive and thought maybe the game was over. Then Alonso smothered the ball, and nobody at Citi Field was sure what the Polar Bear would do next.
"Your mind goes a mile a minute in that situation," third baseman Todd Frazier said.
On days when closer Seth Lugo can't pitch, New York will take its saves any way it can.
New York has taken the first two games in this key four-game set between NL playoff contenders and closed within three games of the Chicago Cubs for the second NL wild card. Arizona, which had won 11 of 12 before the consecutive losses, remained 2 1/2 games behind the Cubs.
Frazier drove a pair of run-scoring doubles for the Mets.
"Right now, we have to win that day," manager Mickey Callaway said. "We'll do anything to do that."
With Lugo unavailable after a two-out save Monday, Wilson got his first save try since April 2, when he recorded five outs to finish off Miami. The left-hander allowed two singles in the ninth before Marte hit a one-out rocket toward Alonso, who knocked the ball down, stepped on first, disregarded the runner heading for second and instead tried to back-pick the lead man at third.
His throw there was too late, leaving Wilson to face Wilmer Flores -- a former Met who holds the record for walk-off hits at Citi Field. Wilson struck him out to wrap up his second save.
"Everybody was thinking it would be a great story and a great ending, but it wasn't," Arizona manager Torey Lovullo said.
Callaway commended Alonso's decision to throw to third, preventing that runner from scoring the tying run. Frazier said Alonso should have tried to tag the runner at first before stepping on the bag, but he was glad the throw came his way, too.
Former Mets closer Edwin Diaz was warming in the bullpen during the ninth but did not pitch after a pair of stunning blown saves last week, including a week ago in Washington when his meltdown capped the Nationals' seven-run ninth inning rally.
Callaway cited those struggles as the reason Wilson was asked for four outs, even on a day when the veteran lefty didn't have his best stuff.
"He just kind of willed that game, that save," Callaway said.
Diamondbacks rookie Zac Gallen (3-5) pitched three-run ball over six innings, becoming the second NL pitcher to begin his career with 14 consecutive starts allowing three earned runs or fewer. Montreal's Steve Rogers had 18 such consecutive outings in 1973.
Wheeler (11-7) struck out seven and allowed seven hits and two walks. The right-hander, set to become a free agent after the season, has a 1.50 ERA over his past three starts.
Gallen struck out nine, including three each against All-Stars Jeff McNeil and Alonso atop the Mets batting order. Gallen is the first pitcher to strike out McNeil three times in a game. He has a 2.66 ERA this season.
"I thought he was fantastic outside of a mistake or two," Lovullo said. "He was pounding the zone."
BIG CITY DRAMA
Before the game, Mets starter Noah Syndergaard said it was "unfortunate" his complaints to New York's front office and coaching staff about catcher Wilson Ramos were made public and denied any role in leaking the conversations. He said he would be fine with pitching to Ramos going forward. The New York Post reported on Syndergaard's frustrations Monday.
Diamondbacks: RHP Taijuan Walker (Tommy John surgery) threw a 14-pitch bullpen. He's hoping to throw an inning for Arizona before the end of the season, but manager Torey Lovullo was uncertain if that would be possible. ... RHP Luke Weaver (right forearm tightness) threw a bullpen and felt good. The team hasn't decided if he'll need another before returning to game action.
Mets: New York recalled RHP Chris Mazza from Triple-A Syracuse.
Diamondbacks left-hander Robbie Ray (12-7, 4.03) hasn't lost a start since July 28. He's been dealing with a blister on his left middle finger but felt good to go after a bullpen Monday. He'll face Mets left-hander Steven Matz (9-8, 4.00), who has allowed two or fewer earned runs in six straight starts.
Follow Jake Seiner: https://twitter.com/Jake-Seiner
More AP MLB: https://apnews.com/MLB and https://twitter.com/AP-Sports
Trout on 3rd MVP: 'I always try to be the best player'
Mike Trout joins SVP after winning the American League MVP award and says it was special to be recognized as the league's best player for the third time.
Bellinger: Winning MVP 'means everything'
Cody Bellinger joins SportsCenter after being announced as the National League MVP and describes how special the award is to him and his family.
Angels' Mike Trout edges Astros' Alex Bregman for AL MVP
Angels center fielder Mike Trout became just the 11th player with at least three MVP awards when he was named the American League's MVP on Thursday. Trout edged Astros third baseman Alex Bregman for the award.
Yankees go high tech, turn to 34-year-old as new pitching coach
Drawn to his high-tech approach, the New York Yankees are turning to unproven 34-year-old Matt Blake as their new pitching coach after losing in the ALCS.
Cody Bellinger 1st Dodger to win NL MVP since Clayton Kershaw in 2014
Cody Bellinger was named the NL's Most Valuable Player on Thursday, beating out 2018 winner Christian Yelich, who finished second in voting, and third-place Anthony Rendon.
Braves boost shaky bullpen, sign ex-Giants lefty Will Smith
The Braves signed free-agent closer Will Smith to a three-year, $39 million contract on Thursday.