Updated

Christian Friedrich got rattled again. This time, leadoff walks got him in trouble and the Colorado Rockies left-hander wasn't able to work his way out of a jam in the fifth inning.

"The whole stage was set by the bases on balls," Colorado manager Jim Tracy said. "That's the hurdle that Christian has to get over."

Erik Bedard pitched effectively into the seventh inning for his first win in more than a month, Andrew McCutchen homered, and the Pittsburgh Pirates beat the Rockies 6-2 on Tuesday night to become the fifth team with at least 50 wins.

Friedrich (5-7) gave up five runs on six hits in 4 2-3 innings in losing for the sixth time in his last seven decisions. He walked three and struck out two.

Friedrich walked Michael McKenry and Clint Barmes to start the inning and Bedard advanced them with a sacrifice. Alex Presley's RBI groundout evened the score and Barmes scored the go-ahead run on Drew Sutton's single.

"You can't go into an inning when you have the (Nos.) 7, 8 and 9 hitters coming up and walk the two leadoff hitters," Friedrich said. "Especially, some of them are really hard to walk."

Andrew McCutchen, who homered in the fourth for the Pirates' first run, then singled. After Friedrich's wild pitch got past catcher Wilin Rosario and rolled to the backstop, allowing Sutton to score from third and McCutchen to move up, Casey McGehee hit an RBI single that chased Friedrich. Neil Walker singled off reliever Matt Reynolds to extend his hitting streak to 17 games before Pedro Alvarez struck out to end the inning.

Tracy said had no intention of pulling Friedrich after the two walks.

"After the bunt, there were a couple of base hits, and we had Matt Reynolds getting ready to go," Tracy said. "But it was a situation where the balls weren't getting smoked."

Tracy had other concerns. Colorado hitters were 0 for 10 with runners in scoring position. Three times the Rockies left the bases loaded and they stranded 13 baserunners.

"We continued to do the things that we had to do to give ourselves a chance, but we could not get a two-out hit tonight," Tracy said. "When you do that the outcome will not be favorable."

Bedard (5-10) went 6 2-3 innings and allowed two runs — one earned — on five hits in snapping his second four-game losing streak of the season. He struck out four and walked four in his first win since beating Kansas City on June 8.

With two outs in the ninth, reliever Juan Cruz walked Dexter Fowler and Carlos Gonzalez, and closer Joel Hanrahan walked Michael Cuddyer to load the bases before striking out pinch-hitter Tyler Colvin to earn his 25th save in 28 chances.

Bedard retired the first two batters he faced in the seventh before Marco Scutaro singled to right. He walked Fowler and Gonzalez to load the bases and was relieved by Jared Hughes who got Cuddyer to fly out to deep center for the final out of the inning.

Pittsburgh then added another run in the eighth on an RBI double by McKenry, a former Rockie.

The Rockies got an unearned run in the third when Scutaro scored from third after left fielder Presley had Cuddyer's fly ball kick off the webbing of his glove for an error.

McCutchen connected for his 22nd homer leading off the fourth, but the Rockies took a 2-1 lead in bottom of the inning when Rosario walked and Josh Rutledge followed with an opposite-field triple to right.

NOTES: Pittsburgh sends RHP James McDonald (9-3) against RHP Jeremy Guthrie (3-9) in the finale of its three-game series at Colorado on Wednesday. ... The Rockies have placed infielders Jonathan Herrera (left wrist infection) and Chris Nelson (irregular heart beat) on the 15-day disabled list and recalled outfielder Andrew Brown and infielder DJ LeMahieu. ... Rockies RHP Jhoulys Chacin (right shoulder inflammation) came out of a 30-pitch simulated game well Tuesday and is slated for a roughly 45-pitch simulated game Sunday. ... Fowler has 16 hits in his last nine games.