Updated

Casey McGehee delivered the decisive two-run home run in the fifth inning and the Pirates held off the Rockies, 9-6, to take the rubber match of a three-game series.

Pedro Alvarez, Garrett Jones and Rod Barajas also homered for the Bucs, who have won nine of their last 13 games.

James McDonald (10-3), who had a 2.37 earned run average heading into the All- Star break, struggled through his second straight start after the break despite picking up the win. The right-hander surrendered six runs on nine hits and four walks in five innings. McDonald allowed five runs -- four earned -- in 4 2/3 innings in his first start of the second half on Friday against the Brewers.

Rockies starter Jeremy Guthrie was let off the hook after another rough start at Coors Field. Guthrie gave up six runs -- four earned -- on six hits and a walk in 2 2/3 innings. Guthrie is now 1-5 with a 9.61 ERA at home this season.

"Frustration, disgust, embarrassment that I can't do what I feel like I'm capable of doing," Guthrie said. "If I throw a pitch in a certain spot, it's been hit. If I've thrown what I think is the right pitch, it's usually been the wrong pitch. When I think I've thrown something in the right location, it's typically been the wrong location."

Matt Reynolds (3-1) gave up three runs on homers by McGehee and Barajas in 1 2/3 innings to take the loss.

Andrew Brown picked up three hits and knocked in a pair of runs in his first major league start for the Rockies, who have lost four of their last five.

After falling behind 5-1, the Pirates stormed back with a five-run third to take the lead. McDonald started the inning with a single and Andrew McCutchen worked a two-out walk before Jones crushed a three-run home run to right-center field.

The Pirates then loaded the bases on an error, a single and a hit batter before Clint Barmes dropped a go-ahead base hit into right field.

"We went out there and still had quality at-bats and fought back and had a couple big hits that put us right back in it," Barmes said. "It's happened many times here. I don't think it was too surprising for anyone here."

Brown tied the game in the fourth inning with a base hit, but Pittsburgh struck for three more in the fifth to take the lead for good. McGehee lofted a two-run homer to right that just cleared the fence and, two batters later, Barajas crushed a solo shot to left.

Brad Lincoln, Jason Grilli, Tony Watson and Joel Hanrahan combined to toss four scoreless innings on relief to hold the lead. Hanrahan retired the Rockies in order in the ninth to earn his 26th save of the season.

The Rockies jumped out to a 3-0 lead when Dexter Fowler hit a leadoff home run and Carlos Gonzalez hit a two-run shot in the first inning.

After Alvarez cut the deficit to two with a solo blast, the Rockies tacked on two more runs without hitting the ball out of the infield. Marco Scutaro produced an RBI groundout and Brown legged out an infield RBI single.

Game Notes

Neil Walker went 0-for-4 and saw his 17-game hitting streak come to an end...Guthrie allowed two home runs and has now allowed a National League- leading 21 this season...McDonald has won five straight decisions...The Pirates lead the majors with 85 runs scored this month. They also led the majors in scoring in June when they scored 146 runs...The Pirates won their third straight series at Coors Field...Jones has hit safely in nine of his 11 career games at Coors Field. He has hit .405 (17-for-42) with four homers and 13 RBI...The Pirates have homered in nine straight games...McDonald has given up six home runs in his last five starts after allowing four in his first 14.