Philadelphia increased its cushion in the division when second-place Atlanta lost to Washington 6-0.
Shane Victorino scored both runs for the Phillies, who totaled only five hits and won despite going 0 for 11 with runners in scoring position.
Florida ended Hamels' streak of 25 1-3 consecutive scoreless innings in the first, bunching three hits, including Dan Uggla's RBI infield single. But the Marlins managed only three hits the rest of the way.