DENVER -- Steven Duggar kept San Francisco in the game with a run-saving catch and Buster Posey put the Giants ahead with a rare pinch-hit.
Posey came through with a two-run double in the eighth inning to rally San Francisco past the Colorado Rockies 6-5 on Saturday night.
"What a huge hit," Giants manager Bruce Bochy said. "It's nice to have him in that situation coming off the bench. Really, great comeback. Buster delivered in a big way."
Posey batted with two on against reliever Carlos Estevez (1-2) and lined a ball to right-center field to score pinch-runner Kevin Pillar and Austin Slater. Will Smith then got three outs for his 27th save.
It was just the second time in his career that Posey put his team in front as a pinch-hitter. He also helped starter Madison Bumgarner avoid a loss on a night the lefty labored through five innings.
"I couldn't throw the ball where I wanted to the whole time I was out there," Bumgarner said. "It wasn't terrible, but it wasn't good by any means."
Estevez faced four batters in the eighth and didn't get an out before being lifted after his second base on balls.
"His pitches were everywhere. He didn't have his stuff," Rockies catcher Tony Wolters said.
Duggar did his part a couple of innings after a miscommunication in the outfield led to a double and Colorado's first run.
The Rockies had taken the lead in the fifth and it appeared they were about to increase it when Ian Desmond hit a drive to deep center field. Duggar ran back to the wall, leaped and snagged the ball over the fence to rob Desmond of a homer and keep it a one-run game.
"I didn't feel like I needed to do something, but at the same time if there was an opportunity to make a play for Bum and keep them off the board, it was something I was looking to do," Duggar said. "An opportunity presented itself and I just wanted to keep it in the park."
Scooter Gennett homered and Pablo Sandoval had three hits, including an RBI double, for San Francisco.
Sam Coonrod (2-0) worked the seventh for the win.
Trevor Story and Charlie Blackmon homered for the Rockies.
Colorado placed All-Star outfielder David Dahl on the 10-day injured list with a high right ankle sprain sustained Friday night. An MRI on Saturday morning confirmed the diagnosis — though the injury looked more serious when his right leg buckled as he was making a catch in center field.
"Glad it's just a high ankle sprain," Dahl said Saturday.
The Giants had lost two in a row to begin August after going 19-6 in July. They scored four runs in the first inning on Sandoval's RBI double, a single by Brandon Crawford and Gennett's homer in his second game since being acquired from Cincinnati on Wednesday.
Bumgarner couldn't hold the lead. The Rockies scored one in the second, pulled to 4-3 on Story's two-run homer in the third and took the lead in the fifth. Blackmon led off with his 22nd homer and Nolan Arenado scored from first on Gennett's errant relay throw home from second base after Daniel Murphy's double to right.
Duggar kept it there with his leaping catch at the wall.
"That was pretty incredible," Bumgarner said. "He got up there."
Giants: 3B Evan Longoria (left plantar fasciitis) is expected to be activated Sunday. Longoria has been out since July 15.
Rockies: OF Yonathan Daza was recalled from Triple-A Albuquerque to take Dahl's place on the 25-man roster.
LHP Ty Blach was claimed off waivers by Baltimore. RHP Dan Winkler cleared waivers and was sent outright to Triple-A Sacramento.
MOMENT OF SILENCE
The Rockies asked for a moment of silence before the game for victims of the shooting in El Paso, Texas, on Saturday and victims in the July 28 shooting at the Gilroy Garlic Festival in California.
Giants RHP Tyler Beede (3-5, 5.01 ERA) faces Colorado LHP Kyle Freeland (2-9, 7.48) to wrap up the three-game series Sunday.
More AP MLB: https://apnews.com/MLB and https://twitter.com/AP—Sports