Mike Cameron worked a two-out, bases-loaded walk 4 victory Sunday over the Phillies, who played the game under protest because of a replay decision earlier in the game.
Clay Hensley (3-6) earned the win with two perfect innings of relief as Florida took the final two games of the three-game series.
David Herndon (1-3) worked himself out of bases-loaded jams in the 12th and 13th innings, but could not get out of a third, giving Philadelphia its first back-to-back losses on the road since dropping four in a row from May 31-June 4 in Washington and Pittsburgh.
Atlanta beat Los Angeles on Sunday, trimming the Phillies' lead to 7 1/2 games for first place in the NL East. The teams start a three-game series in Philadelphia on Monday night.
The Phillies played the game under protest after a call in the sixth inning that took a double away from Hunter Pence because of fan interference. Two men -- including one in a Phillies jersey -- reached over the wall and touched the long drive, getting in the way of right fielder Bryan Petersen, who may have had a chance to catch it.
After a review, Pence was called out and Ryan Howard was sent from third base back to first. The game was tied 2-2 at the time.
Phillies manager Charlie Manuel was ejected for arguing with first base umpire Joe West, Sunday's crew chief, about the ruling.
Roy Halladay went six innings for the Phillies, allowing three runs -- two earned -- on nine hits and a walk. Anibal Sanchez started for Florida and allowed two unearned runs on six hits and three walks through six innings.
Herndon pitched three scoreless innings before returning to the mound in the 14th, as the Phillies bullpen was down to just its closer, Ryan Madson. Emilio Bonifacio drew a leadoff walk and went to second on a sacrifice bunt by Omar Infante. Greg Dobbs was intentionally walked before Gaby Sanchez sent a liner into left, but Raul Ibanez made a sliding catch to keep the game going.
Logan Morrison was intentionally walked to load the bases for the third straight inning. Cameron took a borderline slider on the inside part of the plate with a 2-1 count. Herndon then missed on the inside again with a fastball to push the game-deciding run across the plate.
"It was a good win. We battled back. Normally you don't get that many chances to win a ballgame," said Marlins manager Jack McKeon.
In the sixth, Howard worked a leadoff walk and Pence knocked a long drive to the wall. Petersen jumped to catch it, but the two fans got in his way. There was some confusion as to whether the umpiring crew could use the replay to overturn a double in that situation.
"You hate to see it happen like that," said Halladay. "I've never been a fan of replay to begin with, but that's the way it is now. You can decided those things by watching TV."
When play resumed, Ibanez lined a double down the third-base line, moving Howard to third instead of scoring him for the lead. But after Carlos Ruiz was intentionally walked to load the bases, Wilson Valdez grounded into a 4-6-3 double play to end the inning.
Infante's base hit in the first scored Bonifacio and gave the Marlins an early 1-0 lead.
Ruiz scored on a Dobbs throwing error in the second, and a Michael Martinez RBI single later in the inning put the Phillies ahead.
Howard slapped a two-run single in the seventh before Sanchez's run-scoring groundout in the bottom half of the frame knotted the game at 4-4.
Marlins first baseman Mike Stanton sat out the game with tightness in his right hamstring...Halladay struck out four batters in the game, leaving him five shy of reaching 200 in a season for the fifth time...It was the last scheduled game at Sun Life Stadium between the division rivals.