Brandon Belt put the Giants ahead for good with a two-run double in the fifth inning and San Francisco went on to take a 7-3 victory over the Colorado Rockies Sunday at AT&T Park.
Buster Posey had a solo homer among his two hits, Hunter Pence had a two-run double and the Giants received an RBI apiece from Andres Torres and Brandon Crawford to capture the rubber match of the three-game set.
Matt Cain (4-2) shook off some early troubles to strike out six over five innings. He walked five and gave up two runs on two hits to earn his fourth win in a row.
"The first and the second innings we had guys up, he was close to coming out," said Giants manager Bruce Bochy. "He found a way, it's all about battling. It's quite a job he did."
The Rockies didn't receive much from the heart of their order, with Troy Tulowitzki and Carlos Gonzalez each going hitless in a combined nine at-bats with three strikeouts apiece.
Michael Cuddyer hit a two-run double and Jordan Pacheco drove in a run for Colorado, which saw Jon Garland (3-6) drop a fourth consecutive start. He was tagged for five runs -- two earned -- on seven hits and four walks over five innings.
"I thought Jon battled well, had some tough breaks ... He gave us a chance," Rockies manager Walt Weiss said of Garland.
Cain had a rough beginning, walking three in the first inning to load the bases. Cuddyer then ripped a first-pitch offering into left field for a double that plated two runs and gave Colorado the early lead.
The Giants' righty settled in, though, after walking two more in the second. He limited the Rockies to just one hit over the rest of his start and left with the lead after San Francisco scored three runs in the bottom of the fifth.
Crawford tied the game at 2-2 with an RBI groundout an inning prior, and an error on Colorado second baseman DJ LeMahieu allowed the fifth to continue.
His blunder put runners at the corners for Belt, who ripped a double over the head of Dexter Fowler in center field to plate two runs. Torres then followed with a two-bagger of his own to bring another home and give the Giants a 5-2 edge.
Edgmer Escalona took over for Garland to start the sixth, but couldn't stop the bleeding. He surrendered singles to Marco Scutaro and Posey, both of whom came around to score when Pence's hit into right scooted off the glove of Charlie Blackmon for a double.
Pacheco drove a one-out single into center in the eighth to make it 7-3, but the Rockies went without a hit for the rest of the game.
Posey cut Colorado's two-run lead in half with a leadoff homer in the bottom of the second, and the Giants drew even in the fourth when Belt walked, moved to third on a single from Torres and crossed the plate on Crawford's groundout.
Cain has won his last six starts against Colorado ... Posey extended his hitting streak to 10 games ... Garland hasn't lost four consecutive starts since a career-worst five-start streak from May 24-June 13, 2009 ... The Rockies were 2-for-16 with runners in scoring position.