Mike Fontenot's broken-bat single plated the go-ahead run in the seventh and Aubrey Huff scored the eventual game-winner on a Pablo Sandoval ground ball in the eighth for San Francisco, which is a half-game behind San Diego for the lead in the NL West. The Padres lost at Colorado earlier Wednesday. The Giants, winners in eight of their last 11 contests, are also a half-game behind Atlanta for the wild card lead. The Braves fell at home to Washington Wednesday afternoon.
San Francisco's victory came one night after Clayton Kershaw stymied the Giants in a 1-0 final. The Dodgers won that game despite getting just one hit. Los Angeles had just four on Wednesday.
Cain (12-10) gave up three hits and had five strikeouts to win his third straight decision. The right-hander moved to 2-8 all-time against the Dodgers.
Andre Ethier homered off closer Brian Wilson with two outs in the ninth, but the Dodgers lost the second portion of the three-game series. Wilson then fanned Jay Gibbons to lock down his 43rd save of the year.
Chad Billingsley (11-10) scattered six hits, including Fontenot's base hit, walked two and fanned seven over seven frames, but lost his second consecutive start.
Sandoval fanned to leave the bases loaded in the first inning. After Billingsley singled with one out in the third, neither team had a hit until Buster Posey singled with one out in the bottom of the sixth. Cody Ross flied out to center to leave two runners on base that inning.
Pinch-hitter Travis Ishikawa doubled with one out in the San Francisco seventh and pinch-runner Emmanuel Burriss advanced to third on a wild pitch. With two outs, Fontenot sent a soft liner to center field.
George Sherrill entered to start the bottom of the eighth on the mound for the Dodgers. Huff doubled down the left field line, just beyond a diving Gibbons. After Buster Posey was intentionally walked, Kenley Jansen came in from the bullpen and retired Juan Uribe on a fly ball, but then uncorked a wild pitch with Sandoval at the plate. Sandoval then grounded a ball to the right side, but Ryan Theriot's throw home was high and late.
Cain went over the 200-inning plateau for the fourth straight season, joining Jack Sanford (1960-63), Juan Marichal (1962-71), Gaylord Perry (1966-71) and Jim Barr (1973-77) as only pitchers in San Francisco-era history to log at least four or more consecutive seasons of 200-plus innings...Theriot is mired in an 0-for-25 slump...Wilson is six saves shy of claiming the San Francisco record for a single season as Rod Beck had 48 in 1993.