MIAMI (AP) -- J.T. Realmuto homered in the 10th inning and the Miami Marlins beat the New York Mets 5-4 on Tuesday night after rallying for three runs in the ninth against former teammate A.J. Ramos.
With one out, Realmuto hit a 1-1 pitch from Paul Sewald (0-6) into the Mets' bullpen for his 17th homer.
Miami trailed 4-1 in the ninth before coming back against Ramos, who faced the Marlins for the first time since they traded the closer to New York on July 28.
Justin Bour led off with his 22nd homer, and first since a six-week stint on the disabled list. Ramos then gave up four singles, including two-out RBI hits by pinch-hitter A.J. Ellis and Ichiro Suzuki.
Sewald replaced Ramos and struck out Christian Yelich on a 3-2 breaking ball with the bases loaded to force extra innings. Ramos' blown save was his first with the Mets.
Major league home run leader Giancarlo Stanton walked a season-high four times and struck out in his only at-bat to remain at 55 homers with 11 games to go.
Jose Reyes hit his 14th homer and went 4 for 5 to hike his average to .244. He has 26 games with four or more hits with the Mets, a franchise record.
Yelich hit his 18th homer in the fourth. Travis d'Arnaud's two-run shot, his 13th, put the Mets ahead in the sixth.
Kyle Barraclough (6-2) pitched around a leadoff single in a scoreless 10th.
Mets starter Seth Lugo allowed one run in five innings. Odrisamer Despaigne gave up three runs in six innings for the Marlins and remained winless in the majors since Aug. 1, 2015.
Mets SS Amed Rosario (stomach ailment) missed his second game in a row and is unlikely to play Wednesday, manager Terry Collins said.
Marlins RHP Jose Urena (13-6, 3.62 ERA) is scheduled to start the series finale Wednesday afternoon against RHP Rafael Montero (5-10, 5.08).