Junior Lake scored the go-ahead tally on San Francisco first baseman Brandon Belt's two-run fielding error in the top of the ninth inning, as the Chicago Cubs edged the Giants, 3-2, Friday in the opener of a three-game set at AT&T Park.
San Francisco took a 2-1 lead in the seventh on Jeff Francoeur's two-run single before Santiago Casilla stranded Cubs on second and third in the eighth to get the ball to closer Sergio Romo.
Romo (3-5) served up a leadoff single to pinch-hitter Julio Borbon before walking pinch-hitter Dioner Navarro. The right-hander bounced back with a strikeout of David DeJesus and then got Lake to ground into a fielder's choice to leave runners on the corners with two outs.
Anthony Rizzo then fouled off a pair of 3-2 pitches before ripping a grounder toward first that snuck past Belt and trickled down the right-field line, allowing Borbon and Lake to score for a one-run lead.
Kevin Gregg worked around a leadoff single in the bottom half to secure his 20th save of the season and make a winner out of Matt Guerrier (4-4), who tossed 1 1/3 perfect innings of relief work.
Starlin Castro was credited with the lone RBI for the Cubs, who won for the third time in five games, despite going 1-for-11 with runners in scoring position.
San Francisco starter Matt Cain yielded just one run on six hits while striking out seven over seven frames, but the Giants were unable to hold on late as they fell for the fifth time in their last six games.
"It's always hard at home when you lose a game like this, especially the way we came back," San Francisco manager Bruce Bochy said. "In this game you have to put it behind you and come out here and hopefully wash it off, especially a player like Belt."
The only run Cain gave up came in the sixth came when Nate Schierholtz smacked a one-out double and scored on Castro's single to center to put the Cubs in front.
Chicago starter Edwin Jackson did his part for much of the night, limiting the Giants to two hits over six scoreless innings before running into trouble in the seventh.
Pablo Sandoval got things going with a one-out single before Hunter Pence doubled in front of an intentional walk to Belt.
With the bases loaded and one out, Francoeur punched a single into shallow right-field to score Sandoval and Pence for a 2-1 lead. Belt tried to score when Schierholtz's throw from right sailed past the catcher, but he was tagged out by Jackson between third and home to leave the margin at one.
"For us to fight back in the ninth inning like that was huge," Jackson said. "Great way to start a series with a comeback win like that."
Chicago had lost five straight at AT&T Park and won in San Francisco for the first time since Aug. 30, 2011 ... Prior to the game, the Cubs traded outfielder Alfonso Soriano to the New York Yankees in exchange for Corey Black, a minor league pitcher ... The Giants acquired minor league pitcher Guillermo Moscoso from the Cubs for a player to be named later or cash considerations prior to the game ... Lake went 0-for-5 to snap a seven-game hit streak to begin his career.