DENVER -- The San Francisco rally produced three runs Sunday, by no means a seismic outburst, but one that was a long time coming and most welcome.
The Giants parlayed that fifth-inning uprising into a 5-2 win over the Colorado Rockies that broke a six-game losing streak.
The skid was San Francisco's longest since a seven-game run from June 26-July 2, 2010. The Giants also ended a seven-straight road losing streak, improving to 15-27 away from AT&T Park.
Madison Bumgarner (8-5) allowed one run in seven innings -- Carlos Gonzalez hit his 22nd homer in the sixth -- marking the fifth straight start he has yielded three or fewer runs. In those games, Bumgarner is 4-1 with a 2.18 ERA.
Colorado's Michael Cuddyer extended his franchise-record hitting streak to 27 games with a two-out single in the eighth. After striking out and grounding out twice against Bumgarner, Cuddyer hit a one-hopper that went off the hand of reliever Sandy Rosario and into center field.
Wilin Rosario followed with a double off the wall in right that cut the Giants' lead to 5-2, but Rosario struck out Nolan Arenado, who slammed his bat down in disgust after missing a high fastball on the ninth pitch of the at-bat.
Hunter Pence hit a two-run homer and Buster Posey hit a solo home run, just the second time since June 9 that the Giants had two homers in a game.
The Giants scored one run in each of their first two losses in this series and just 18 runs in their previous nine games, including two or fewer runs in seven of the contests. However, they took advantage of a ragged 92-pitch start by Drew Pomeranz in his 2013 Rockies debut.
Pomeranz (0-1) gave up seven hits, including the two homers, four walks and four runs in 4 1/3 innings.
Andres Torres began the fifth-inning rally with a single, and Tony Abreu doubled to deep center. Posey, who homered in the third, grounded to second, but first baseman Jordan Pacheco threw the ball into left field while trying to get Abreu, who was scampering back to second.
Pence followed with a two-run homer into the Rockies' bullpen in right-center on an 0-1 curveball. It was the 13th homer for Pence and broke the Giants' string of 18 consecutive hitless at-bats, including four on Sunday, with runners in scoring position.
The only inning Pomeranz retired the side in order was the fourth, when he faced the Giants' bottom three hitters. Four of the seven hits he allowed went for extra bases, including Posey's 12th homer in the third on a 2-1 fastball.
Pomeranz went 8-1 with a 4.20 ERA at Triple-A Colorado Springs with 96 strikeouts and 33 walks in 85 2/3 innings. He was recalled to replace ineffective Juan Nicasio in the Rockies' rotation.
The Giants added a run in the seventh when Manuel Corpas walked Juan Perez with two out. Perez scored when Guillermo Quiroz dropped a single into short right field, the ball landing between second baseman DJ LeMahieu and right fielder Cuddyer.
NOTES: Rockies CF Dexter Fowler was not in the lineup for the fifth straight game due to right wrist soreness. He said the wrist was better and with an off day Monday hopes to play Tuesday. ... Rockies RHP Rob Scahill was optioned to Triple-A Colorado Springs to clear a roster spot for Pomeranz. In three different stints with the Rockies this season, the last of which began May 29, Scahill is 0-0 with a 4.26 ERA in 13 games. ... The Rockies' search for a right-handed bat off the bench led them to sign veteran OF Xavier Nady, 34, to a minor league contract. He will report to Colorado Springs. The Kansas City Royals released Nady from Triple-A Omaha, where he hit .310 with 11 homers and 43 RBIs in 70 games but had a chance to leave if another opportunity arose with a major league club. ... Posey started at first base for the second straight game and eighth time this season. Posey played first base at the expense of Brandon Belt, whom manager Bruce Bochy said he didn't feel comfortable putting in the spacious left field at Coors Field.