With the loss, the Phillies fall to 28-26 and remain in last place in the extremely tight National League East. Winners of seven of their last nine games, they will attempt to win their third consecutive series when they host the Marlins (30-23) in the series' rubber match on Sunday.
For Hamels (8-2), both of his losses this season have come against Miami. In 6 2/3 innings, the southpaw allowed five runs on seven hits, none more costly than a sixth-inning, two-run home run from Hanley Ramirez, the second of two dingers the Marlins third baseman hit against Hamels in the game.
Hamels, who struck out eight and walked two, attributed his subpar performance to getting behind in counts, leaving a few pitches over the zone and a couple of walks.
Things were looking up early for the Phillies, as Hamels opened the game by getting Jose Reyes to chase a high fastball to cap a three-pitch strikeout. Three innings later, the only blunders on the lefty's line were a hit and a walk. The Phillies had also given him a run of support in each of their first three innings.
The first home run allowed to Ramirez, a solo homer in the fourth, came on a first-pitch fastball. The umpires reviewed it for possible fan interference, causing a stoppage of play for a couple minutes, and the homer was eventually upheld.
Three batters later, left fielder Justin Ruggiano, making his first start as a Marlin, hit an RBI double to narrow Philadelphia's lead to 3-2.
"I thought it was a home run right off the bat," Hamels said of Ramirez's first homer. "If it wasn't going to be a home run, I was going to be more lucky than anything, because I threw the pitch. He guessed right and hit it hard. When that happens, they definitely deserve the home run. But you have to come back, get the next guy out. I wasn't able to do that."
Hamels took the blame on Ramirez's second home run. He threw a changeup, but said he cut the pitch back over the plate.
"I think if I was able to kind of at least hang on, I don't think it would've gone out of the stadium, probably would've stayed in," Hamels said. "But at least [it] would've given me an opportunity to try to get out of that inning unscathed."
Hamels entered the game tied for the Major League lead with eight wins and had won eight straight decisions. Saturday's contest marked the first time Hamels surrendered five earned runs in a start since July 16, 2011, when the Mets tagged him for seven.
Despite that, the Phillies still had chances to win.
Jimmy Rollins tripled to lead off the eighth, and Marlins starter Ricky Nolasco followed it by issuing a four-pitch walk to Juan Pierre -- his final batter of the day. Pierre stole second to put two runners in scoring position, and Hunter Pence hit a sacrifice fly off Steve Cishek that scored Rollins, advanced Pierre to third and brought up Carlos Ruiz, who entered the game with the best batting average in the Major Leagues.
However, Ruiz couldn't come through as the hero, swinging and missing on a slider for strike three. Shane Victorino worked a walk, and with a full count and two outs, Ty Wigginton struck out swinging.
In the ninth, the Phillies had another opportunity, as Placido Polanco led off with a single against Miami closer Heath Bell. Mike Fontenot pinch-ran for Polanco and advanced to second on a sacrifice bunt by Freddy Galvis. After laying down the bunt, Galvis evaded a tag on the first-base line, but the umpire called him out for running out of the basepaths.
"I saw the replay and I was right on the line," Galvis said. If I get to first with the bunt, we get a base hit and we win the game, you know. So it's kind of frustrating, that call."
The Phils did not get a hit after that, as pinch-hitter Brian Schneider popped out to second and Rollins popped out to shortstop to end the game. The Phillies are now 0-20 in games they trail after seven innings.
"We didn't pull it off, but we put ourselves in situations where we could have tied the game or [gone] ahead. But unfortunately it didn't happen that way," Victorino said. "So I look at the positives that early in the season, we wouldn't even get in that point to put ourselves in contention. ... I look back at where we are right now, and that's a positive sign. But again, that's just the game of baseball. Sometimes you do it. Sometimes you don't."