Updated

Brett Pill drove in the winning run in the bottom of the eighth inning as the San Francisco Giants knocked off the Colorado Rockies, 3-2, in the opener of a two-game set at AT&T Park.

Gregor Blanco finished 3-for-4 with a pair of runs scored and a solo homer and Buster Posey added an RBI single among his two hits for the Giants, who have won three straight games.

"It's great to see the club playing a lot better here the last three days," Giants manager Bruce Bochy said.

Sergio Romo (2-0) earned the win after recording the final out in the eighth and Santiago Casilla allowed a run in the ninth, but recovered to secure his eighth save of the year.

Wilin Rosario slugged a solo homer run and Marco Scutaro plated the other run on an error by Giants third baseman Joaquin Arias for Colorado, which has lost four in a row.

Rex Brothers (1-2) was tagged with the loss after allowing Blanco to reach with an infield single in the eighth before scoring the go-ahead run.

With the game tied at one, the Giants took the lead for good in the eighth. Blanco beat out an infield single to start the inning and was able to get to third when Arias dropped a bunt down the first base line and reached on a throwing error by Rosario.

After Melky Cabrera flied out to left, Posey picked up his teammate by stroking a single up the middle to bring home Blanco and give the Giants a 2-1 lead. Following a flyout by Angel Pagan, Pill served a single through the hole and into left to score Arias.

In the ninth, Casilla allowed a one-out single to Jonathan Herrera and walked pinch-hitter Jason Giambi. Scutaro then sent a hard ground ball to third that squeezed through the legs of Arias and allowed Herrera to score. Casilla bounced back and fanned Dexter Fowler before inducing the game-ending groundout from Chris Nelson with the bases loaded.

"You can't be disappointed with this effort. You're disappointed with the outcome because we played a good ball game," Rockies manager Jim Tracy said.

Earlier, the Rockies broke a scoreless tie in the fourth when Rosario led off the inning by blasting a slider from Giants starter Ryan Vogelsong over the wall in left field for his fifth longball of the season and a 1-0 lead.

San Francisco threatened in the fifth when Pill beat out an infield single with one down and Brandon Crawford slapped a base hit into right field two batters later to put runners on first and second with two down. But Rockies starter Christian Friedrich got Vogelsong swinging to end the inning.

The Giants evened the game at one in the sixth when Blanco led off the frame by sending a fastball from Friedrich into the right-field bleachers for just his third career home run.

Game Notes

San Francisco kicked off a seven-game, three-team homestand on Monday. The Giants will also face St. Louis and Oakland during their stay at AT&T Park...Monday marked the 100th consecutive home sellout for the Giants...Cabrera (0-for-4) had his 11-game hitting streak snapped...San Francisco has won 10 of its last 12 home games against Colorado...Vogelsong gave up one run on three hits and five walks while fanning three in seven innings...Friedrich allowed one run on six hits and a walk while striking out 10 over seven frames.