MIAMI — The New York Mets came from behind twice, and that wasn't enough.
New York overcame an early 3-0 deficit to take the lead, and tied the seesaw game by scoring with a two-out rally in the ninth. But the Mets stranded 13 runners, including three in the eighth and three more in the ninth.
They have scored 22 runs in the past three games but lost two of them.
"We're swinging the bats OK," manager Terry Collins said. "We just got to get our pitching straightened out."
Mets starter Jacob deGrom went six innings, He allowed nine hits and three runs, all in the fourth, when he gave up four consecutive hits.
"I feel like I threw the ball a little better than it showed," he said. "I kept the ball down pretty good. I got a lot of groundballs. Some of them just went through the infield."
The right-hander's ERA has climbed to 2.40 from 1.98 on Aug. 24, but he was in line for his 13th win before an uncharacteristically shaky showing by the bullpen in the seventh.
Cole Gillespie singled to open the 11th against Mets reliever Erik Goeddel (0-1). Yelich hit into a fielder's choice against left-hander Eric O'Flaherty, and scored without a play when Prado lined a ball into the right-field corner.
Prado's five hits were a career high. The Marlins totaled 17 hits in their fourth consecutive victory.
Tom Koehler held the Mets to two runs in six innings.
"We gave them some opportunities to get back in game, but we just kept answering back offensively," Koehler said.
The Mets trailed 5-4 with two outs in the ninth when Travis d'Arnaud singled off closer A.J. Ramos. D'Arnaud took third on a single by Juan Uribe, and Kelly Johnson's single up the middle tied the game and handed Ramos his sixth blown save in 29 chances.
Kirk Nieuwenhuis tapped out with the bases loaded to end the inning.
Marlins manager Dan Jennings is expected to return to his former job of general manager next season, but he declined to address speculation a decision has been made.
Which job does he like better?
"Right now I'm the manager," Jennings said. "That's what I like."
Mets: OF Michael Cuddyer (right wrist tendinitis) was unavailable. He said he'll wear a splint and hopes to return to action in a day or two. ... INF Daniel Murphy (quad) will be sidelined until at least Sunday, Collins said. ... 1B Lucas Duda (back) is expected to play two or three games at Double-A Binghamton in a rehab stint beginning Saturday. ... INF Wilmer Flores rejoined the Mets on Friday after missing Wednesday's game to be with his ailing grandfather in Venezuela.
Marlins: RF Giancarlo Stanton still has soreness in his left hand, which required surgery in June, and he'll likely play in a simulated game before being activated, Jennings said. ... RHP Jarred Cosart (vertigo) was recalled from Single-A Jupiter and might make his first start since July 4 on Sunday, Jennings said. ... SS Adeiny Hechavarria (hamstring) was scratched from the starting lineup but expected to miss only a game or two, Jennings said.