Matt Cain pitched seven shutout innings and Mike Fontenot broke a scoreless tie with a two-out RBI single in the seventh inning off San Francisco nemesis Chad Billingsley, leading the Giants to a 2-1 victory over the Los Angeles Dodgers on Wednesday night.

Fontenot got the start in place of Freddy Sanchez and delivered the big hit that plated San Francisco's first run of the series and ended a streak of 29 2-3 innings without an earned run against Billingsley (11-10).

The Giants won for the 10th time in 14 games to move within a half-game of first-place San Diego in the NL West. San Francisco is also a half-game behind Atlanta in the wild-card race.

San Francisco finally broke through against Billingsley in the seventh inning. Pinch-hitter Travis Ishikawa started it with a one-out double that snapped a 13 at-bat hitless streak and was his first hit since Aug. 18.

Pinch-runner Emmanuel Burriss moved to third on a wild pitch, but it looked as if the Giants might waste another scoring opportunity against Billingsley when Eugenio Velez hit a comebacker for the second out. That's when Fontenot delivered with his soft single to center field.

Billingsley allowed six hits and walked two in seven innings, striking out seven. He lost to San Francisco for the first time in five starts this season but still has an 0.74 ERA against the Giants in 2010.

San Francisco added an insurance run in the eighth when Aubrey Huff doubled and scored on Pablo Sandoval's grounder.

Sergio Romo pitched a scoreless eighth. Brian Wilson allowed a two-out homer to Andre Ethier in the ninth before getting his 43rd save in 47 chances.

Cain (12-10) gave up three hits, walked none and didn't allow a runner to get past first base. He beat the Dodgers for the second time in three starts after going winless in his first 14 games against Los Angeles.

The teams picked up where they left off from the opener of the series when Clayton Kershaw beat the Giants 1-0 on an unearned run that scored on an error by shortstop Juan Uribe. The Dodgers won despite getting only one hit against Barry Zito and the bullpen. The Giants became the first team in 39 years to lose two games in one season when allowing one or fewer hits, having lost the same way to San Diego on April 20.

The Giants threatened against Billingsley, but were unable to break through until the seventh. They loaded the bases in the first inning before Sandoval struck out to end it. Fontenot hit a drive to the warning track in left field with two on to end the fifth and Billingsley struck out Sandoval and got Cody Ross to fly out to center with two on in the sixth.

NOTES: San Francisco leads the majors with a 1.55 ERA this month. ... Giants RF Jose Guillen had an epidural for a bulging disk in his neck and could be available Thursday. ... Dodgers 2B Ryan Theriot is hitless in his last 25 at-bats, including a close play at first base on an attempt for a bunt single in the sixth.