The Phils came out on top in a battle of Coles yesterday afternoon, topping the Pirates 6-4 to take the series two games to one.

Both Cole Hamels and Gerrit Cole pitched well, but Gerrit Cole got an early hook and not much help from his pen. The Phils took a 6-2 lead into the eighth before De Fratus coughed up a pair of runs that got the Pirates within two, but Papelbon shut them down in the ninth.

The Pirates came into the set white-hot winners of nine in a row, but the Phils outpitched them in the series. They got a solid start from Pettibone and 3 1/3 innings of scoreless relief in game one and a solid outing from Hamels in yesterday’s game.

The Phillies are 41-45 on the year after beating the Pittsburgh Pirates 6-4 yesterday afternoon. The Phils take the series two games to one and are in third place in the NL East, 8 1/2 behind the first-place Braves and 2 1/2 behind the Nats.

The Phillies would have to go 49-27 (.645) in their remaining 76 games to finish the season with 90 wins.

Hamels got the start for the Phillies and went seven innings, allowing two runs on five hits. Only one of the runs was earned. One of the hits went for extra-bases, a double. He struck out eight and didn’t walk a batter.

The Phillies are just 4-14 on the year in starts by Hamels, but have won his last two times out. Righties have hit for a lot more power against him in 2013 than in recent years, but he fared well against them last night.

Jose Tabata doubled to left with one out in the first, but Hamels got Andrew McCutchen on a fly ball to center for the first out and Gaby Sanchez on a popup to Ruiz for the third.

Hamels struck out Russell Martin and Pedro Alvarez in a 1-2-3 second.

He struck out Clint Barmes and pitcher Gerrit Cole to start the third before Starling Marte singled to right. Tabata was next and grounded a ball to the third base side of short. Rollins dove, backhanded and threw to second, where Ultey just didn’t catch the ball. It rolled around in short right field until Howard got it. Marte would up at third and Tabata on second. Utley was charged with an error. McCutchen was the next batter and he singled into center, scoring both runners to put the Pirates up 2-0. Sanchez grounded to short to end the inning.

Marte would have been safe at second on the ball hit by Tabata, even if Utley had caught it. Because Tabata got a single, one of the two runs charged to Hamels in the frame is earned. Had Utley caught the ball, it still would have been men on first and second with two down. The inning still would have continued and Marte still would have scored on the single by McCutchen.

Hamels threw a 1-2-3 fourth.

The lead was cut to 2-1 when he set the Pirates down in order in the fifth.

The Phillies were up 5-2 when he threw a 1-2-3 sixth.

He allowed a leadoff single to Martin to start the seventh, but got the next three to leave Martin at first.

Hamels allows just one base-runner in the fourth, fifth, sixth and seventh on Martin’s single to start the seventh.

De Fratus started the eighth with the Phils up 6-2. Jordy Mercer and Starling singled back-to-back to start the frame, putting men on first and second with nobody out for Tabata. Lefty Garrett Jones hit for Tabata and singled to center. Mercer scored (6-3) and Marte moved up to third. McCutchen was next and grounded into a double-play. 6-4 with two down and the bases empty. Sanchez flew to left for the third out.

De Fratus faces five batters in the frame, allowing three hits. Huge double-play by McCutchen holds the damage to two runs. At least he didn’t walk anyone.

His ERA for the year is up to 5.19. He’s allowed eight runs in five innings over his last nine appearances. He’s faced 34 batters over those appearances and they’ve hit 458/606/625 against him.

Papelbon pitched the ninth. Pedro Alvarez singled with one out. Papelbon got Neil Walker on a fly ball to left for the second out. Lefty Travis Snider hit for the pitcher Ryan Reid and Papelbon struck Snider out swinging 0-2 to end the game.

The Phillie lineup against righty Gerrit Cole went (1) Revere (2) Utley (3) Rollins (4) Howard (5) Brown (6) Delmon Young (7) Frandsen (8) Ruiz. Frandsen starts at third with Michael Young on the bench and Revere leading off.

Revere led off the top of the first with a single to center, but was caught stealing after Utley struck out. Rollins delivered a two-out single into center, but was caught stealing with Howard at the plate to set the Phillies down.

Two caught stealings in the inning for the Phils. Revere’s went catcher to first base to second and Rollins was thrown out in the traditional way.

Revere stole three bases against the Mets on June 22. Since then he hasn’t stolen a base and has been caught four times.

Howard singled to left to start the second, but the Phillies went in order behind him.

Revere singled to left with two outs in the third and moved up to third when Utley followed with a double. Rollins struck out swinging 0-2 to leave both runners stranded.

Down 2-0, the Phillies went in order in the fourth.

Ruiz singled to right with one out in the fifth and Hamels bunted him up to second with the second out. Revere was next and he singled to center. McCutchen threw home trying to get Ruiz, but his throw was terrible, way off line up the first base line. Ruiz scored (2-1), McCutchen was charged with an error and Revere took second. Utley grounded to first to leave Revere stranded.

Revere 3-for-3 with an RBI through the first five innings. Comes up with a big two-out hit to get the Phillies on the board.

Howard walked with one out in the sixth and moved up to second when Brown followed with a single to right. Righty Vin Mazzaro came in to pitch to Delmon Young and Young singled to left, loading the bases for Frandsen. Frandsen blooped a ball down the first base line that dropped for a single. Everyone moved up a base and Howard scored, tying the game at 2-2. Ruiz was next and lined a single into center, scoring Brown and Young. 4-2 with men on first and third with one out. Hamels was grazed by an 0-2 pitch, loading the bases again. Lefty Tony Watson came in to pitch to Revere. Revere grounded to short. Ruiz was out at third, but Frandsen scored to make it 5-2 with two down and runners on first and second. Utley flew to right to leave them there.

Quick hook for Cole. He had thrown just 78 pitches in the game and allowed one run. Left with one out and men on first and second and both went on to score.

Big break for the Phils with Hamels getting grazed by the pitch way down in the count. Gets them another runs as Frandsen is able to score on Revere’s ground out.

Rollins singled off of Watson to start the seventh, but Howard grounded into a double-play behind him. Brown struck out looking for the third out.

Delmon Young singled off of righty Ryan Reid to start the eighth and Mayberry ran for him at first. Frandsen was next and was hit by a pitch, putting men on first and second with nobody out for Ruiz. Ruiz bunted the runners up to second and third with the first out. Michael Young hit for Hamels and flew to left, deep enough for Mayberry to tag and score from third. 6-2 with two down and Frandsen on second for Revere. Revere flew to center to set the Phillies down.

Frandsen hit by a pitch again. Seven in 107 plate appearances (about 6.5% of his PA). Nobody else on the team has been hit more than three times.

Utley tripled to center off of Reid to start the ninth with the lead cut to 6-4. Rollins popped to short for the first out. Howard struck out swinging for the second. Brown was walked intentionally to put runners on the corners for Mayberry. Mayberry grounded to third to leave the runners stranded.

No run for the Phillies after the leadoff triple in a two-run game. Rollins and Howard both can bring the runner home from third with less than two outs. Howard doesn’t put the ball in play against the righty.

Revere was 3-for-5 with a caught stealing and two RBI. 4-for-13 in the three-game set. 290/329/330 for the year. 333/373/381 over 204 plate appearances since the start of May. On-basing .293 at home and .355 on the road.

Utley was 2-for-5 with a double and a triple. Made a non-catch error on a throw from Rollins in the third that cost the Phillies a run. 3-for-12 with two walks, two doubles and a triple in the set. 282/349/521 for the year. 300/363/527 against righties and 238/314/508 against lefties. Better power against lefties than righties and more points of on-base percentage, but a lot more hits coming against righties.

Rollins was 2-for-5 and struck out twice. 4-for-14 with a double in the set. 264/325/362 for the year. One walk in his last 31 PA. Two extra-base hits, both doubles, and a .277 slugging percentage in his last 125 PA.

Howard 1-for-4 with walk. Struck out with Utley on third and one out in the ninth. 3-for-9 with a walk and an RBI in the series. 3-for-his-last-27 with three singles. 266/319/457 for the year.

Brown 1-for-4 with an intentional walk. 5-for-12 with a home run in the series. His numbers against righties have passed his numbers against lefties for the season. 278/331/561 against righties and 282/311/518 against lefties. 279/326/549 for the year. He came into the season having walked in 10.4% of his plate appearances and slugging .388 with an isolated power of .152. This year his isolated power is .270 and he’s walked in about 6.5% of his PA. Seems like his monster power display in 2013 should mean more walks, but it’s meant less.

Delmon Young 2-for-4. 6-for-12 with a double in the set. 17-for-his-last-35 with a 486/514/657 line over 37 PA with nine RBI. 273/323/443 for the year.

Frandsen 1-for-3 with an RBI. 2-for-5 with two RBI in the series. 286/387/440 for the year.

Ruiz 2-for-3 with two RBI. 4-for-9 with a walk and four singles in the set. 278/339/309 in 110 PA for the year. 12-for-his-last-31 (.387).

Lee (9-2, 2.59) faces righty Tim Hudson (4-7, 4.22) tonight in Philly as the Phils face the Braves. Lee hasn’t allowed more than three earned runs in any of his last 11 starts and he’s averaged about 7.6 innings per start in those outings. Opponents have hit .189 against him over 30 innings in his last four starts. Hudson has a 2.45 ERA over his last six outings, but his most recent start was the worst of the six as he allowed four runs in 5 2/3 innings against the Diamondbacks.

Update 7/8: Ryan Howard needs surgery and will be out 6-8 weeks.