MIAMI -- Pinch-hitter Josh Willingham kept his cool rounding the bases until he passed third. Then, approaching a mob of Florida Marlins teammates already celebrating his game-winning home run, he flipped his helmet into the air.
"I didn't know what else to do. I think I saw someone do it once on TV," Willingham said. "I knew they were going to pound me on the head. I was hoping they wouldn't do it as much with the helmet off, but it didn't seem to matter."
"It was just an unbelievable feeling," Willingham said. "To win one like that, to kind of steal one from them, it's good."
Miguel Olivo singled on the first pitch to start the ninth and reached second on a sacrifice. Willingham pulled the first pitch over the scoreboard for his 16th homer and his first pinch-hit of the season, snapping New York's four-game winning streak.
"What can you say? A bloop, a bunt and a bomb," said Wagner, who blew a save for the fifth time in 27 chances. The homer came on a fastball down the middle.
"It started in and then ran back across the plate," Wagner said. "You make a bad pitch like that and you pay for it. I missed my spot by about 17 inches."
The Marlins overcame an early 4-1 deficit. The game-ending homer was their first since Mike Lowell hit one on May 29, 2004 -- also against the Mets. The 186-game stretch between walk-off homers was the longest in the majors.
"It's one of the most dramatic moments we've had this season," outfielder Cody Ross said. "I was jumping up in the air. It was like I was back in high school."
Matt Herges (1-2) pitched a scoreless ninth for the win.
The Mets' Carlos Beltran hit his fifth home run in three games and his 33rd of the season. The two-run homer gave him 14 RBI in the past four games.
"You have a good day, but you want to be able to focus on the win and not a tough loss like this," Beltran said.
New York's Jose Reyes broke a 4-all tie when he homered to start the seventh. He also tripled and scored three times.
NL East leader New York fell to 22-11 in one-run games, while Florida improved to 13-20. The crowd of 16,641 had divided loyalties, with chants of "Let's Go Mets!" by transplanted New Yorkers answered with jeers from Marlins fans.
When Willingham delivered the game-winner, it was all cheers for Florida.
"Sometimes allegiances can switch," Marlins manager Joe Girardi said.
Willingham homered for the fourth time in his past 10 at-bats.
"I can't explain it," he said. "It's one of the crazy things about baseball."
Hanley Ramirez hit his 10th homer for Florida. Marlins center fielder Alfredo Amezaga struck out with the bases loaded to end the sixth and misplayed a fly ball in the Mets' three-run third.
Amezaga failed to retreat on Reyes' liner and let the ball carry over his head for a triple. Paul Lo Duca then hit an RBI single past a drawn-in infield, and Beltran homered for a 4-1 lead.
Florida tied the game in the fourth, scoring three runs with two outs. Ramirez hit a two-run homer, and Olivo and Olsen followed with back-to-back doubles. Olsen's extra-base hit was his first in 35 career at-bats.
A baserunning stumble cost the Mets a run in the first inning. Reyes slipped and fell rounding third with a chance to score on a potential triple by Beltran. Reyes retreated safely to third, but Beltran was caught making a wide turn at second and tagged out.
Reyes then scored on Carlos Delgado's two-out single.
The Mets' defense gave up a run in the first when right fielder Lastings Milledge, recalled Monday from Triple-A Norfolk, lost a routine two-out fly in the setting sun and let it drop for a single. That put runners at first and second, and Ross doubled for a 1-all tie.
- Milledge scraped his left hand when spiked sliding into second base in the eighth and left the game. He said he'll be available to play Wednesday.
- Mets setup man Duaner Sanchez had season-ending shoulder surgery.
- Beltran leads the NL with 22 road homers, one shy of Howard Johnson's 1987 team record.
- Olivo had two hits on the first pitch, hiking his average to .538 when he puts the first pitch in play.
- Reyes' 10th homer tied a record for Mets shortstops.