Hanley Ramirez hit two homers and drove in three runs to help the Miami Marlins beat the Philadelphia Phillies 5-4 on Saturday.
Ricky Nolasco (6-3) allowed four runs on eight hits in seven-plus innings to improve to 6-1 in seven career starts at Philadelphia for the Marlins. Miami has won four of its last five and denied Cole Hamels (8-2) his ninth victory.
Jose Reyes had an RBI double to extend his hitting streak to 13 games.
Hunter Pence homered for the second straight game for the Phillies, who lost for just the third time in 10 games.
Ramirez homered in his second straight at-bat in the sixth, a two-run shot to left, to give Miami a 4-3 lead. After Omar Infante led off the inning with an infield single, Ramirez drove Hamels' 2-2 changeup into the seats in left for his 12th career multihomer game.
Reyes increased the lead to two runs with a two-out RBI double to left that put Miami up 5-3 and spell the end for Hamels.
Hamels (8-2) gave up a season-high five runs on seven hits in 6 2-3 innings. It was the left-hander's first loss since his first start, a 6-2 defeat to Miami on Apr. 9. Hamels was attempting to become the first nine-game winner in the majors.
The Phillies got a run back in the eighth. Jimmy Rollins led off with a triple to right and Juan Pierre walked to put runners on first and third. Marlins manager Ozzie Guillen lifted Nolasco for Steve Cishek. Pence hit a sacrifice fly off Cishek, scoring Rollins, but the right-hander sandwiched strikeouts of Carlos Ruiz and Ty Wigginton around a walk to Shane Victorino to preserve Miami's lead.
Heath Bell pitched a scoreless ninth for his 11th save in 15 chances. Bell allowed the tying run to reach second with one out, but got pinch-hitter Brian Schneider and Rollins to pop out.
Juan Pierre scored in the first on Ruiz's groundout to give the Phillies a 1-0 lead. Ruiz entered leading the majors batting .381.
Rollins' RBI infield single in the second and Pence's leadoff homer to right in the third put Philadelphia ahead 3-0.
The Marlins got a pair of runs back in the fourth on Ramirez's leadoff homer to left-center and Justin Ruggiano's RBI double to right. Umpires reviewed Ramirez's homer to see if a fan interfered with the ball, but confirmed it a homer after a short delay.
Ramirez is batting .444 (20-for-45) in his last 12 games.
Fan, follow and download: Get the latest from NBCPhiladelphia.com anytime, anywhere. Follow us on Twitter, Facebook and NBC Philadelphia. Sign up for our sports newsletter. And, get breaking news delivered right to your mobile phone -- just text PHIBREAKING to 639710 to sign up. (Message and data rates may apply.)