Travis d'Arnaud hit a go-ahead RBI single in the eighth inning to lift the Mets to a 4-3 win over the Miami Marlins on Wednesday night.
Kirk Nieuwenhuis hit a two-run home run, and Matt den Dekker had three hits for the Mets, who won two of three in the series with the Marlins.
Miami's Giancarlo Stanton homered for the third consecutive game to give him 36 on the season and bring the Marlins within 4-3 in the eighth after the Mets took a two-run lead in the top half of the inning.
Carlos Torres (6-5) pitched 1 1-3 innings in relief to earn the victory. Jenrry Mejia got the final three outs in the ninth, following a leadoff walk, for his 23rd save in 26 opportunities.
Den Dekker led off the eighth with a single off Mike Dunn (10-6), who also allowed a hit to Lucas Duda. Dunn was replaced by Bryan Morris, who immediately allowed an RBI single to d'Arnaud to right field to give the Mets a 3-2 lead. Dilson Herrera's groundout then scored Duda.
Jacob deGrom allowed one run and six hits in six innings for the Mets. He struck out six, walked two and left with a 2-1 lead.
Marlins starter Tom Koehler struck out a career-high 10 batters in seven innings and allowed two runs, five hits, and four walks.
The Marlins tied it 2-2 in the seventh inning. Adeiny Hechavarria doubled to deep center field off reliever Buddy Carlyle, and lefty Dario Alvarez came in to face Christian Yelich, who singled to right to score Hechavarria.
Miami opened the scoring in the third with an RBI single by Casey McGehee. Nieuwenhuis' third home run of the season gave the Mets a 2-1 lead in the fourth.
Juan Lagares led off the game with a single for the Mets, stretching his on-base streak to six consecutive plate appearances. He finished the game 2 for 5.
A day after Mets captain David Wright had three hits to break out of a 7-for-50 skid, he struck out four times and went 0 for 5.