SAN FRANCISCO -- A.J. Ellis broke a 1-1 tie with a bases-clearing double off Sergio Romo with two outs in the ninth inning, and the Los Angeles Dodgers outlasted the San Francisco Giants 4-1 Sunday at AT&T Park.
The Dodgers got eight three-hit innings from ace Clayton Kershaw (8-5).
The victory allowed the Dodgers to win the series between National League West rivals 2-1 and run their record to 4-2 on their current road trip. Surging Los Angeles has won nine of its last 11 games against NL West competition.
Yasiel Puig, who had struck out in six of his previous seven at-bats against Giants pitching, hit Romo's third pitch into left-center field for a single to open the decisive ninth.
Adrian Gonzalez followed with a one-hopper that Buster Posey, playing first base, tried to backhand, but the ball kicked off his glove. When the Giants' All-Star threw errantly in a belated attempt to get Puig at second, the rookie sensation raced to third.
Following an infield out and an intentional walk to Andre Ethier to load the bases, Romo (3-4) struck out the hero of the Dodgers' win Friday night -- Juan Uribe -- before Ellis stepped to the plate and smacked his difference-maker to the fence in left-center field.
The three RBIs ran the Dodgers catcher's season total to 23.
Kershaw (8-5) continued his mastery of the Giants, especially in San Francisco, by allowing just one run in eight innings. He walked one and struck out three before turning the ball over to Kenley Jansen, who recorded his ninth save by pitching a one-hit ninth.
Kershaw entered the game with the lowest ERA (0.74) in the history of AT&T Park for visiting pitchers who have made at least five starts there. That mark went up only slightly to 0.79 in his third consecutive victory over the Giants this season.
Selected to his third consecutive All-Star team Saturday, Kershaw lowered his major-league-best ERA to 1.89. He was coming off a complete-game shutout in an 8-0 win at Colorado on Tuesday.
The Giants have lost 11 of their last 13 games. They entered the contest averaging a major-league-low 3.1 runs per game since June 1.
Giants right-hander Chad Gaudin, making his first start since getting hit by a line drive near the right elbow against the Miami Marlins on June 20, matched Kershaw pitch for pitch before being pulled after seven innings of four-hit ball. He was activated from the disabled list prior to the game.
Gaudin threw just 92 pitches in his seven innings, walking one (intentionally) and striking out a season-best nine. He allowed one run.
The teams traded early runs to result in the 1-1 tie that lasted until the ninth. Los Angeles' Hanley Ramirez tripled and scored on an Ethier single in the second. Guillermo Quiroz, who had doubled, scored for the Giants in the third on a sacrifice fly from Andres Torres.
Ramirez's triple extended his hitting streak to 18 games.
NOTES: The Dodgers were without CF Matt Kemp for the second consecutive game between of a left shoulder injury suffered in the series opener Friday. Kemp is expected to be back in action when the Dodgers open a three-game series at NL West-leading Arizona on Monday night. ... RHP Ricky Nolasco, acquired Saturday from the Marlins, has been slated to start for the Dodgers on Tuesday night in the second game of the Diamondbacks series. LHP Chris Capuano, who gave up 13 runs on 17 hits in his last two starts, was demoted to the bullpen. ... To make room for Gaudin on the active roster, the Giants send LHP Mike Kickham back to Triple-A Fresno. Kickham had a 12.50 ERA in three appearances, including two starts. ... The Giants will face an All-Star for the second consecutive day when RHP Matt Harvey pitches for the New York Mets in the opener of a three-game series in San Francisco on Monday night.