Updated

Andrew McCutchen singled home pinch-runner Josh Harrison with two outs in the ninth inning to lift the Pittsburgh Pirates to a 5-4 victory over the Philadelphia Phillies on Sunday.

McCutchen finished with three hits, none bigger than his smash off the center-field wall against reliever David Herndon (0-1), allowing Harrison to waltz home from third.

Joel Hanrahan (1-0) pitched a perfect ninth for Pittsburgh, which beat the five-time defending NL East champions in its final at-bat for the second time in less than 24 hours. The Pirates won 2-1 in 10 innings Saturday.

Pedro Alvarez homered and Casey McGehee hit two doubles for the Pirates.

Hunter Pence hit his first home run of the season and drove in two runs for Philadelphia. Juan Pierre added two hits and two RBIs in his first start with the Phillies, but the bullpen couldn't protect a late three-run lead.

The Phillies appeared to be in control after taking advantage of some sloppy Pittsburgh defense to grab a 4-1 lead in the seventh against reliever Jared Hughes. A walk and an error by Pittsburgh second baseman Neil Walker put runners on second and third and Pierre sliced a single to right.

Pittsburgh battled back in the bottom of the inning as McGehee ripped a double to right off reliever Michael Stutes and Alex Presley followed with a run-scoring single to get the Pirates within one.

Stutes and Tabata then got into a 10-pitch battle which Stutes narrowly escaped when Tabata's drive to left sailed just foul. Tabata later flied out to end the threat.

The Phillies wouldn't be so fortunate in the eighth.

McCutchen singled, Yamaico Navarro walked with one out and rookie first baseman Matt Hague — who made the team after hitting seven homers during spring training — hit a soft liner to left just over the outstretched glove of Philadelphia shortstop Jimmy Rollins to score McCutchen and tie the game.

Hanrahan cruised through the ninth and McGehee doubled to lead off the bottom of the inning. Harrison entered and moved to third on Presley's sacrifice bunt. Herndon struck out Tabata before McCutchen drove a 3-2 pitch to center.

Pittsburgh starter James McDonald gave up two runs and four hits in six innings, walking two and striking out three while looking much better than he did during a miserable spring training in which he posted an 8.21 ERA. McDonald was better against Philadelphia's depleted lineup, his only real mistakes coming against Pence.

He gave Philadelphia the lead in the first, driving home Shane Victorino with a double to left, and then clobbered a fastball from McDonald to the deepest part of PNC Park in the fourth. The drive easily cleared the 410-foot sign in left-center to put Philadelphia up 2-0.

It looked as though that might be enough for Vance Worley, who gave up Alvarez's homer but not much else in six innings, mirroring strong performances by Philadelphia aces Roy Halladay and Cliff Lee to start the season.

NOTES: The Pirates have won 10 of the 12 series between the teams at PNC Park. ... Philadelphia's Jim Thome made his first start at first base since 2007. He was perfect in the field and turned a 3-6-3 double play in the fourth. ... The Phillies host the Marlins in their home opener on Monday. Cole Hamels (14-9, 2.79 ERA in 2011) will start for Philadelphia. Anibal Sanchez (8-9, 3.67 ERA in 2011) gets the nod for Miami.