Updated

It took four starts, but Cole Hamels finally conquered the Miami Marlins and the Philadelphia Phillies took the opener of a three-game set, 4-0.

Hamels (13-6), coming off a five-hit shutout against the Atlanta Braves, went the distance again against Miami. He struck out five and held the hosts to seven hits and a walk en route to his sixth career shutout.

"I play to win and I'm not gonna go out there and give up when a season can supposedly be given up on already," said Hamels. "I want to win every game I possibly can."

A day after providing a game-winning single in the 11th inning, Juan Pierre picked up three hits and drove in a run for the Phillies, who snapped a five- game losing streak against the Marlins and won for the third time in their last four games overall.

The Phils tagged Miami starter Nathan Eovaldi (3-8) for three runs -- two earned -- on eight hits and three walks in five full frames.

Donovan Solano and Jose Reyes each picked up a pair of hits in a losing effort for the Marlins, who have dropped four of their last five games.

Jimmy Rollins got the Phillies started with a one-out single in the third inning, then Pierre nubbed a ground ball that deflected off Eovaldi and found left field to put runners on the corners. Chase Utley dropped a double down the right-field line to score Rollins and give the Phillies an early lead.

After a walk to Ryan Howard, Dom Brown flied out, but John Mayberry reached on a Greg Dobbs error, allowing Pierre to score for a 2-0 game.

In the fourth, Pierre roped a triple into the right-field corner to score Rollins, who reached on a fielder's choice, to give the Phillies a three-run advantage.

"I missed a couple spots with Rollins and Pierre," said Eovaldi.

Three innings later, Brown worked a one-out walk before Mayberry and Kevin Frandsen singled to load the bases. Erik Kratz lofted a fly ball to center field to score Brown and extend Philadelphia's lead to four.

Meanwhile, Hamels settled into a groove. After allowing a two-out single in the third to Jose Reyes, Hamels retired 11 straight hitters until a two-out, seventh-inning hit from Austin Kearns.

Dobbs followed with another hit, but Hamels induced a rally-killing foul out from John Buck. The veteran lefty went on to finish off his 12th career complete game by working around a two-out double from Giancarlo Stanton.

Game Notes

Rollins tied Larry Bowa, who managed Rollins and the Phillies from 2001-04, for most games played by a shortstop in franchise history with 1,730...The Marlins optioned catcher Brett Hayes to Triple-A New Orleans following Sunday's game and selected the contract of catcher Rob Brantly on Monday. The team also transferred pitcher Sandy Rosario to the 60-day disabled list...The Phillies placed outfielder Nate Schierholtz on the 15-day DL with a fractured right toe and recalled infielder Hector Luna on Monday...Hamels has thrown seven-or-more innings in 16 of his 23 starts...Hamels has thrown 22 straight scoreless innings...The Marlins have been shut out 12 times in 2012.