SAN FRANCISCO - Brandon Belt's RBI single with one out in the bottom of the 10th inning gave San Francisco a 3-2 victory over Colorado on Monday night, their second straight walkoff win.
The defending World Series champions, however, were eliminated from contention in the NL West earlier in the evening when the Los Angeles Dodgers beat the Arizona Diamondbacks.
Angel Pagan hit a one-out single off reliever Adam Ottavino (1-3) and took third on Marco Scutaro's single. Belt, who doubled in the tying run in the eighth, hit a 1-2 pitch over the head of left fielder Charlie Culberson for his second game-ending hit this season.
D.J. LeMahieu singled and doubled to extend his career-high hitting streak to 11 games, and Nolan Arenado scored from second base on an infield groundout for the Rockies.
Buster Posey hit his 15th home run of the season for San Francisco, which was kept in check offensively most of the game by Colorado starter Jhoulys Chacin.
Chacin struck out five and walked one over seven innings, lowering his ERA in 12 starts on the road to 2.10. The right-hander retired 16 of the final 18 he faced and left with a 2-1 lead.
Colorado's bullpen couldn't make it hold up.
Pagan reached on a one-out infield single off Matt Belisle and took second when Arenado's throw from third sailed past first base for an error. After Scutaro's groundout moved Pagan to third, Belt doubled to right to drive in Pagan with the tying run.
The Giants are still on the brink of being eliminated from playoff contention altogether with one more loss.
They were on the verge of that before Belt led the comeback after a pitcher's duel between Chacin and San Francisco's Tim Lincecum.
Lincecum allowed two runs over eight innings but was denied a chance at his fourth consecutive win. The two-time NL Cy Young winner struck out three and walked one.
The Rockies scored their first run after a defensive breakdown by the Giants.
Arenado doubled in the second and was headed for third on Yorvit Torrealba's slow roller between the mound and first base when he noticed no one covering home. Arenado quickly scampered home, and with no one covering, San Francisco first baseman Belt's throw sailed to the backstop.
After Posey's homer tied it, the Rockies made their own defensive gaffe.
As fogged drifted over the waterfront ballpark, Pablo Sandoval lofted a high fly ball to left center. Colorado's Corey Dickerson ran toward the warning track but inexplicably stopped and let the ball drop in as Sandoval raced to second with a double.
Colorado went up 2-1 on Troy Tulowitzki's RBI single in third.
NOTES: Giants pitchers Chad Gaudin and Jeremy Affeldt threw to hitters before the game, and manager Bruce Bochy said both are close to being ready to come off the DL. ... Belt was hitless in his first three at-bats before driving in the tying and winning runs.