DENVER (AP) Alex Dickerson had a career-best four hits, including the go-ahead RBI single in San Francisco's four-run 10th inning as the Giants recovered from blowing a three-run lead in the ninth to beat the Colorado Rockies 8-4 on Tuesday night.
Mike Yastrzemski homered and doubled among his three hits and had three RBIs for the Giants, who have won seven of their last eight games including four in a row.
Trevor Story and Ian Desmond homered for the Rockies, who have lost 10 of 12.
Trailing 4-1 going into the ninth, the Rockies rallied off Giants closer Will Smith (3-0). Story connected for his 21st home run of the season to start the inning. One out later, Daniel Murphy singled and Desmond followed with a drive that reached the center field seats to tie it. It was the second blown save for Smith in his last three chances after converting 23 straight to start the season.
But the Giants answered by rallying off Rockies closer Wade Davis (1-4). He issued two one-out walks before Dickerson singled to right as the Giants regained the lead. Brandon Crawford followed with an RBI single and Bryan Shaw relieved Davis. Yastrzemski singled to drive in another run before the Giants scored an unearned run on third baseman Nolan Arenado's fielding error.
Mark Melancon pitched a scoreless 10th.
Ahead by a run, the Giants added to their lead in the top of the eighth. Scott Oberg issued a leadoff walk to Brandon Belt and after Buster Posey moved him up with a single, he scored on Dickerson's single, his third base hit of the night.
Yastrzemski added another run on the top of the ninth, driving the first pitch he saw from reliever Chad Bettis over the left-centerfield fence for his seventh home run of the season.
The Giants took a 2-0 lead in the second inning when Dickerson led off with a single and scored one out later on Yastrzemski's double. Yastrzemski came home on Joe Panik's single.
The Rockies began their half of the sixth inning with a walk by pinch hitter Garrett Hampson and single by Charlie Blackmon. Trevor Gott relieved Drew Pomeranz and Hampson scored on Trevor Story's fielder's choice. Nolan Arenado was hit by a pitch on his left hand, putting runners at first and second with one out but the threat ended when Daniel Murphy's sharply hit grounder up the middle was stopped by shortstop Crawford who stepped on second and quickly threw to first to turn the inning ending double play.