SAN DIEGO — The Mets needed five outs Sunday to finish what had been a good few days in the land of perfect weather and gain in the wild-card standings on two of the three teams ahead of them.
It was all going smoothly until Jose Butto walked Matt McCoy. Moments later, Butto was watching Jurickson Profar circle the bases, having flushed the Mets’ lead by allowing Profar a two-run homer.
The late-inning misery ended with Edwin Diaz walking off the mound with his head down, after Jackson Merrill’s ninth-inning blast rocketed into the right field seats and gave the Mets a 3-2 walk-off loss to the Padres at Petco Park.
And so, the Mets had to settle for a split in the four-game series against a top wild-card contender and missed an opportunity to match a season high by moving seven games above .500.
The Mets remained 2 ½ games behind Atlanta for the NL’s third wild card. Diaz struck out Jake Cronenworth to begin the ninth before the rookie sensation Merrill pounced on a 98-mph fastball and ended it.
The Mets have Monday to recover before opening a three-game series in Arizona a day later.
The Mets owned the afternoon until Profar smashed his two-run homer against Butto in the eighth that tied it 2-2. Butto, in his second inning of work, walked McCoy before Profar hit a 95-mph sinker over the right-field fence to tie it.
Jose Quintana was at his best, and the Mets needed it.
The left-hander delivered 6 ¹/₃ shutout innings in which he allowed four hits and two walks.
Butto retired Luis Arraez with two runners aboard for the second out in the seventh before Luis Torrens nailed Merrill attempting to steal second to end the inning.
It was a much-needed strong performance from Quintana, who had scuffled to an 8.27 ERA in his previous four August starts. That included allowing seven earned runs over five innings in a loss to the Orioles last Tuesday.
Quintana allowed a double to Manny Machado leading off the second and then didn’t allow another hit until McCoy’s single in the sixth. Profar had an infield single leading off the game against Quintana, but was erased on a Xander Bogaerts double play grounder to end the inning.
J.D. Martinez’s homer against Martin Perez with two outs in the fourth accounted for the game’s first run.
Martinez launched a cutter on the outside edge to right-center, clearing the 396-foot sign for his 15th homer of the season. The blast was Martinez’s third in his last seven games.
Jose Iglesias, Torrens and Harrison Bader all walked to load the bases following Martinez’s homer, ending Perez’s outing as Francisco Lindor approached the plate.
Bryan Hoeing entered and struck out Lindor, who had delivered two homers, including a grand slam, the previous night.
Pete Alonso and Brandon Nimmo each delivered a single in the fifth before Hoeing struck out Starling Marte and Martinez in succession to end the threat.
Mark Vientos’ homer in the seventh widened the Met lead to 2-0. The homer was his 21st of the season and fifth in August.
After Profar’s homer tied it in the eighth, Butto struck out Donovan Solano and allowed a single to Bogaerts.
Phil Maton was summoned to face Machado with the tying run on first base and retired the Padres third baseman.