Giants 4, Dodgers 0

SAN FRANCISCO -- Right-hander Tim Lincecum extended his streak of scoreless innings at home to 22 with seven innings of three-hit, shutout ball Wednesday night, pitching the San Francisco Giants to a 4-0 victory over the Los Angeles Dodgers.

San Francisco's fifth consecutive win was its second in two nights over Los Angeles, trimming the Dodgers' lead in the National League West to 2 1/2 games. The Giants beat the Dodgers in six of eight games this season.

Shortstop Brandon Crawford's third hit of the game, a two-out RBI single in the sixth inning, ended a scoreless duel and catcher Buster Posey belted a two-run homer in the seventh as the Giants won their fifth straight over L.A., the longest streak against their rival since 2003.

The Dodgers loss followed news earlier in the day that left-handed starting pitcher Hyun-Jin Ryu will undergo arthroscopic surgery on his left shoulder Thursday in Los Angeles. He is expected to miss the rest of the season.

Lincecum (4-2) outdueled Dodgers left-hander Brett Anderson (2-2) in a game played in a steady rain beside the San Francisco Bay.

On a night when he passed Hall of Famer Carl Hubbell for fourth place on the Giants' all-time strikeout list, Lincecum won a fourth consecutive start for the first time since 2009. He struck out four and walked two while lowering his ERA at home this season to 1.13.

Lincecum recorded at least one strikeout in all 254 of his career starts, the longest active streak in majors.

He was matched pitch for pitch by Anderson for five innings before the Giants finally broke through in the sixth after a leadoff double by Posey, his second of three hits.

Crawford's tie-breaking hit came with two on and two out, giving San Francisco a 1-0 lead.

The Giants broke the game open in the seventh, scoring first on an RBI single by second baseman Joe Panik, which ended Anderson's night.

Posey, who earlier extended his hitting streak to 12 games, then greeted right-handed reliever Yimi Garcia with a two-run shot to center field, his seventh homer of the season.

Anderson was charged with three runs on six hits in his 6 1/3 innings. He walked three and struck out seven.

Right-hander Jean Machi, and lefties Javier Lopez and Jeremy Affeldt pitched the final two innings for the Giants, who recorded their majors-leading seventh shutout of the season. San Francisco won the series opener Tuesday 2-0 behind right-hander Tim Hudson.

Affeldt, who worked a scoreless ninth, recorded his first save of the season.

Second baseman Howie Kendrick had two hits, including a double, for the Dodgers, who scored only two runs in their last 39 innings.

Lincecum recorded his milestone strikeout in the top of the sixth, fanning Dodgers first baseman Adrian Gonzalez with two outs. It was his fourth strikeout of the game.

NOTES: Asked before the game if he expected LHP Hyun-Jin Ryu to return this season following his scheduled shoulder surgery Thursday, Dodgers manager Don Mattingly admitted, "I didn't get that feeling." ... Thursday's series finale pairs reigning National League Most Valuable Player LHP Clayton Kershaw of the Dodgers and World Series MVP LHP Madison Bumgarner of the Giants for the third time this season. The Giants won the first two head-to-heads, 3-2 in San Francisco and 2-1 in Los Angeles. ... Wednesday's matchup of the California rivals was the 37th in which they went head-to-head as first- and second-place teams in the NL West. ... The Giants announced before the game that RHP Jake Peavy (strained back) will be sent to Class A San Jose to pitch one inning in a rehab start Friday.
Final1st2nd3rd4th5th6th7th8th9thRHE
Los Angeles DodgersDodgers000000000060
San Francisco GiantsGiants000001300480
WP:Tim Lincecum (SF)
LP:Brett Anderson (LAD)