Updated

Hunter Pence hit a three-run home run to help the San Francisco Giants take a 4-2 win over the Colorado Rockies in the opener of a three-game set.

Buster Posey drove in the other run while Pablo Sandoval added two hits and a run scored for the Giants, who stopped a two-game slide. Madison Bumgarner (2-0) gave up two runs on five hits with five walks and five strikeouts in 5 2/3 innings.

"He's got some of the most power I've ever seen," Posey said of Pence. "I get to hit with him in batting practice every day, and I try to make sure I hit before him so I don't have to follow up his moonshots."

Carlos Gonzalez hit a solo home run while Chris Nelson drove in a run for the Rockies, who had a five-game winning streak snapped. Jorge De La Rosa (0-1) gave up three runs on six hits with a walk and three strikeouts over six innings of work.

The Giants jumped out on top on the first inning. Marco Scutaro and Sandoval hit one-out singles, but Posey then struck out. Pence, though, slammed a pitch over the wall in left for his third home run of the season and a 3-0 lead.

"It was supposed to be away," De La Rosa said of his pitch to Pence. "That one cut a little bit to the middle. He hit it very good. ... That's a mistake from me. I paid for it."

Gonzalez hit a solo home run in the third inning to cut the Rockies deficit to two.

In the sixth, Colorado made it a one-run game. With one out, Michael Cuddyer singled to center and stole second after Josh Rutledge struck out. Nelson then punched a single to left to plate Cuddyer.

The Giants gave themselves and insurance run in the eighth when Posey singled in Angel Pagan, who had reached base on an infield single and had stolen second.

Sergio Romo gave up a leadoff double to Rutledge in the ninth, but struck out the next three batters to pick up his fourth save of the season.

Game Notes

San Francisco won 14 of the 18 games with Colorado last season ... Colorado went 1-for-9 with runners in scoring position and stranded seven ... Tim Lincecum pitches for San Francisco on Tuesday while Juan Nicasio takes the mound for the Rockies.