SAN FRANCISCO -- Travis Wood pitched a four-hitter over seven innings and had a home run among his two hits in helping the Chicago Cubs complete a three-game sweep in San Francisco for the first time in 20 years, beating the Giants 2-1 Sunday.
Welington Castillo also homered for the Cubs, who won their third straight and five of seven.
Pablo Sandoval drove in a run for the Giants, who have lost four straight and seven of eight.
Tim Lincecum (5-11) had two hits in addition to pitching seven innings. He gave up two runs and four hits. He walked two and struck out a season-high 10.
Wood (7-7) allowed an unearned run while walking four and striking out seven. Wood was 1-4 over his previous nine games. He's been involved in 10 one-run decisions.
Pedro Strop threw a scoreless eighth, his 12th consecutive scoreless outing (10 2-3 innings) since joining the Cubs on July 2.
Kevin Gregg recorded the final three outs for his 22nd save in 25 chances, and his third straight of the series.
Wood ended the scoreless tie with his third home run, a solo shot with two outs and on a 2-2 count, in the fifth. It was the first career home run Lincecum has allowed to an opposing pitcher.
Lincecum survived a shaky start to retire 13 of 14 batters until Wood took him deep.
The Giants left the bases loaded in the third and had the bases loaded with no outs in the fifth. Buster Posey's grounder to Luis Valbuena turned into a 5-2 double play before Sandoval doubled to tie the game.
Castillo hit his third home run with two outs in the seventh, giving the Cubs a 2-1 advantage.
The Giants, who have committed a major league-leading 76 errors, took fielding practice instead of batting practice before the game.
The Giants have hit one home run in each of their past four homestands, a span of 22 games.