Updated

Brandon Belt clubbed a solo home run and knocked in four overall to lift the San Francisco Giants over the Colorado Rockies, 9-8, in the middle test of a three-game set Tuesday at Coors Field.

Marco Scutaro and Angel Pagan each plated a run, while starter Madison Bumgarner smacked a three-run homer for the Giants, who have won three of five and own a 6-game lead over the Dodgers atop the NL West.

"We have to keep focusing on what we're doing," Giants manager Bruce Bochy said. "This was a hard-fought game. Typical Coors Field game and we held on."

George Kontos (2-1) earned the victory after striking out the final two hitters in the fifth in relief of Bumgarner, who gave up five runs on 11 hits over 4 1/3 frames.

Carlos Torres (4-2) was tagged with the loss after giving up four runs on four hits over two innings of relief work.

Tyler Colvin launched a pinch-hit, two-run homer in the ninth, but the Rockies lost for the sixth time in their last seven games.

"It's really encouraging to see young people performing offensively against some of the teams that we've been playing against in the manner in which they've performed," Colorado manager Jim Tracy said of his club's effort.

With the game locked at 4-4 entering the fifth, Scutaro singled into right field and Buster Posey worked a walk two batters later before Belt laced a two-out double into the left-field corner to give the Giants a 6-4 edge.

Colorado battled back in the bottom half on Matt McBride's RBI single, but Kontos entered and fanned back-to-back hitters to escape the fifth.

Pagan scorched an RBI triple into right-center field in the sixth and then crossed home on Scutaro's sacrifice fly before Belt launched a two-out homer in the top of the seventh to extend the lead to 9-5.

In the eighth, pinch-hitter Charlie Blackmon and Dexter Fowler smacked back- to-back singles before Santiago Casilla replaced Jeremy Affeldt.

After a force out at second put runners on the corners, Carlos Gonzalez laced a single into left field to plate Blackmon, but Casilla got Wilin Rosario to ground into an inning-ending double-play to end the threat.

Sergio Romo yielded a two-out single to McBride in the ninth before Colvin crushed a fastball into the right-field seats trim the margin to one.

Javier Lopez entered and got pinch-hitter Jason Giambi to pop out weakly to third base to secure the victory and nail down his seventh save of the season.

Earlier in the game, Colorado scored in the second when Jordan Pacheco clubbed a one-out double and quickly scored on Chris Nelson's base hit.

Colorado starter Jhoulys Chacin ripped a leadoff double in the third and Fowler followed with a bunt single. Josh Rutledge's double-play groundout scored Chacin before Gonzalez doubled and quickly crossed home on Rosario's base hit to center field.

Pacheco followed with a single to score Rosario and make it a 4-0 contest.

San Francisco answered with four in the fourth, as Posey singled, moved to third on Pence's base hit and then scored on Belt's groundout.

Gregor Blanco then singled and, after Brandon Crawford grounded out, Bumgarner helped his own cause with a long drive into the left-field seats to knot the game at 4-4.

Game Notes

Pagan tied a San Francisco record for triples in a season (12) ... Rockies reliever Rob Scahill made his major league debut in the ninth inning. He allowed one hit ... Chacin was charged for four runs on six hits and a walk over four innings.