MIAMI — New York Mets closer A.J. Ramos took the mound at Marlins Park with a three-run lead in the ninth inning and quickly found himself in trouble, a development that didn't surprise Miami manager Don Mattingly.
"We've seen him have innings like that," Mattingly said. "He gets himself in a little bit of a mix and usually gets out of those."
Not this time. Ramos made high-wire escapes routine when he was with the Marlins, but they scored three times against him , and J.T. Realmuto homered in the 10th for a 5-4 victory Tuesday night.
The Marlins won a series for the first time since Aug. 25-27. Miami trailed 4-1 in the ninth before coming back against Ramos, who faced the Marlins for the first time since they traded him July 28.
"Maybe I was a little too amped up," Ramos said. "They put the ball in play. There's no excuse. They just beat me."
The blown save was Ramos' first for the Mets, but he said his slider hasn't been consistent lately. New York manager Terry Collins agreed.
"It's his big pitch, and you can't leave it in the zone," Collins said. "I know he was fired up about getting in there tonight. We just didn't get it done."
Justin Bour led off the ninth 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 .
Paul Sewald replaced Ramos and struck out Christian Yelich on a 3-2 breaking ball with the bases loaded to force extra innings.
But with one out in the 10th, Realmuto hit a 1-1 pitch from Sewald (0-6) for his 17th homer, and first career walk-off shot.
"I was actually looking to go with something the other way, hit something to right field, get the inning started and get on base," Realmuto said. Instead, he pulled the pitch into the Mets' bullpen.
Realmuto also singled off Ramos in the ninth, and discussed the matchup with Mets catcher Travis d'Arnaud.
"It was weird," Realmuto said. "When I stepped in the box I looked at d'Arnaud and I was like, 'This is awkward. I've caught this guy a ton of innings, and know what he's about to do to me, but it's way different when you're in the box.'"
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. D'Arnaud's two-run shot, his 13th, put the Mets ahead in the sixth.
Odrisamer Despaigne gave up three runs in six innings for the Marlins and remained winless in the majors since Aug. 1, 2015. Kyle Barraclough (6-2) pitched around a leadoff single in a scoreless 10th.
Mets starter Seth Lugo allowed one run in five innings.
Mets SS Amed Rosario (stomach ailment) missed his second game in a row and is unlikely to play Wednesday, 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).