MIAMI -- Carlos Delgado swung, and the opposing pitcher was as surprised as anyone.
The Marlins scored five runs in the seventh inning, highlighted by Delgado's ninth homer, to salvage the final game of the four-game series and snap a four-game losing streak.
Heath Bell (0-2) replaced Tom Glavine to start the seventh with the Mets leading 2-1, but he was pulled after giving up consecutive singles to Luis Castillo and Miguel Cabrera. Delgado hit a 3-0 pitch from Dae-Sung Koo over the right field wall for a 4-2 lead.
Delgado had the green light all the way.
"I like to hit on 3-0," Delgado said. "There's a difference between being selective and aggressive. I was looking for something to drive. I didn't want to hit a bad pitch. It was good to come through and stop the losing streak."
Koo was expecting Delgado to take a pitch.
"I didn't think he was going to swing," Koo said through an interpreter. "I wanted to get the outside corner but I made the wrong pitch."
After Mike DeJean relieved Koo, Juan Encarnacion singled and scored on Alex Gonzalez's one-out double. Matt Treanor singled and Jeff Conine beat out a potential double-play grounder, allowing Gonzalez to score for a 6-2 lead.
"Thank God for Carlos," Marlins manager Jack McKeon said. "You have to let guys like him hit and he's been hitting well lately. It's good to get this losing streak off our back before we go on the road."
Beckett (7-3) gave up both runs and struck out five. Todd Jones pitched the ninth for his eighth save in nine chances.
"I didn't have my best stuff, so I got lucky," Beckett said. "I had decent location but no velocity. I'd rather be lucky than good. Going 6-4 on this homestand looks a lot better than 5-5."
Glavine allowed eight hits and one run in six innings. He struck out four and walked two.
"I was definitely tired, so it was a matter of me going maybe one more inning or putting in a fresh bullpen," Glavine said. "When you pitch like that you like to win those games. I'm disappointed for our team we didn't win but I'll take three out of four against these guys."
Bell came into the game with a 6 1/3 inning scoreless streak.
"I felt real good when I went out there but now I feel bad I let the team and Glavine down," Bell said. "The first guy (Castillo) just chopped it and (Cabrera) hit a pitch away that got through the hole. I got my groundballs but they didn't get hit at anybody."
The Mets took a 1-0 lead in the fifth when Doug Mientkiewicz hit the first pitch from Beckett into the right field stands for his seventh homer and first since May 9 at Chicago.
The Marlins tied it at 1 in the bottom half when Juan Pierre singled to open the inning and moved to second on a single by Castillo. Delgado took advantage of an infield shift to the right by poking a groundball between short and third to score Pierre.
- The Mets have 26 home runs in their last 22 games.
- Mets OF Mike Cameron's first-inning double was his seventh in the last 15 games. Cameron has hit in 13 of his last 15 games.
- Delgado has 11 RBI during the seven-game homestand.
- Kendra Shearer, the winner of the NBC television show "The Apprentice," threw out the first pitch. Shearer lives in nearby Boynton Beach.