Updated

With a starting pitcher that allowed one run and a left fielder that threw out a runner at home to keep the game tied heading into the sixth inning, Colorado Rockies manager Jim Tracy had a rare opportunity to feel optimistic after another loss.

That's the kind of season it has been for the Rockies.

Jhoulys Chacin matched Madison Bumgarner for five innings and Andrew Brown threw out Brandon Crawford at the plate before San Francisco beat the Rockies 2-1 Monday night. Colorado has lost 10 of its last 12 games.

"There are no moral victories, OK?" Tracy said. "But when you look at the fact that we had six or seven rookies on the field tonight. ... With these young people, they're going to make mistakes and we know that. It's never good to lose, please don't misunderstand what I'm saying, but when you have young people involved in games like this, there's one (heck) of a learning point there."

Crawford tripled, doubled and scored on a passed ball in another highlight-filled game defensively, and Hunter Pence singled home the go-ahead run off reliever Guillermo Moscoso (3-2) in the sixth inning.

Bumgarner (15-10) allowed one run and four hits in six innings while walking a career-high five, gutting out a start in which he said his "mechanics were probably the worst they've been all year." The lefty struck out six and relied on a strong defensive effort to extend San Francisco's lead in the NL West to a season-high eight games over the idle Dodgers.

"That feels better to win a game like than when you're really sharp," Bumgarner said.

Chacin gave up five hits and a run, struck out two and walked one. He also doubled and scored on Josh Rutledge's triple in the fifth.

Four relievers held Colorado scoreless before Sergio Romo struck out pinch-hitter Jason Giambi for his 12th save in 13 chances, helping San Francisco open a 10-game homestand by winning for the fifth time in six games.

"It's very frustrating whenever after you get out they score one run, then we lose 2-1," Chacin said. "I just want to keep feeling good, be healthy and finish the season strong."

Buster Posey went 2 for 4 and threw out Dexter Fowler at second in the first inning, backing Bumgarner's first win in five starts. And while Bumgarner hardly looked sharp at the start, walking four of his first 11 batters, he pitched out of jams and allowed his defense to do the rest.

Crawford dug out a ball deep in the hole at shortstop and threw across his body to get Jordan Pacheco at first base for the second out of the third.

"It's a play that we practice every once in a while," Crawford said. "Even just kind of messing around sometimes because it's a tough play to make."

In the bottom of the inning, Crawford hit a leadoff triple off the top of the wall in center and scored on catcher Wilin Rosario's 20th passed ball of the year to give San Francisco a 1-0 lead.

With the Rockies doing little to back Chacin, the pitcher helped his own cause when he doubled and scored on Rutledge's two-out triple in the fifth.

Crawford doubled leading off the San Francisco fifth and tried to score when Angel Pagan singled to left, but was cut down at home on Brown's one-hop throw.

Pence's single in the sixth scored a tumbling Pablo Sandoval from second to put the Giants ahead 2-1 and runners on the corners with no outs. Moscoso got Brandon Belt and Xavier Nady to pop out and struck out Crawford, pumping his fist in celebration while walking off the mound.

The momentum never carried over.

Rockies slugger Carlos Gonzalez was out of the starting lineup with a sore left hamstring after cramping a day earlier, and Colorado's offense showed little pop in his absence. Left-hander Javier Lopez got the pinch-hitting Gonzalez to ground out for the second out of the ninth.

Bumgarner had walked four batters four times previously, twice this season. Guillermo Mota, Jose Mijares and Santiago Casilla combined for 2 1-3 innings of hitless relief.

"In defeat, it's a good teacher," Tracy said." If you go back and look at some of these games that we have been beaten, going back to the Atlanta-Philadelphia trip, you will find things. The defensive side of things is vitally important in games like this because to think every time you get a scoring opportunity you're going to cash in is a complete misnomer for any of 30 teams in baseball. The little things you can take care of, you have to take care of those things, and we need to do a better job of that."

NOTES: Rockies LHP Jorge De La Rosa will start against the Giants on Thursday in his first major league appearance since Tommy John surgery last year, Tracy said. LHP Drew Pomeranz's start has been pushed back to Friday against Arizona, and Alex White will move to the bullpen for now. ... The Giants send Tim Lincecum (9-14, 5.09 ERA) to the mound against Rockies LHP Jeff Francis (5-5, 5.68) on Tuesday.