SAN FRANCISCO -- Los Angeles Dodgers manager Don Mattingly reshaped his starting rotation at the All-Star break to ensure that his two aces, right-hander Zack Greinke and lefty Clayton Kershaw, would face the National League West-leading San Francisco Giants one week into the second half of the season.

Greinke and Kershaw did their jobs on successive nights, and now the Giants are no longer the West leaders.

Following up on a brilliant performance by Greinke on Friday, Kershaw delivered the Dodgers back into first place in the NL West, pitching a complete-game, two-hitter Saturday night in a 5-0 victory over the Giants.

"We've come in here and pitched very well," Dodgers manager Don Mattingly said of the 8-1 and 5-0 wins. "And we're swinging the bats, too. We've done what we needed to do."

In beating the Giants (57-47) for the second consecutive night, the Dodgers (58-47) not only moved a half-game ahead of their rivals but also clinched their first series win over San Francisco since last July.

The Giants, who led the Dodgers by 9 1/2 games on June 8, had held or shared the division lead since the All-Star break.

"You've got to give them credit," Giants manager Bruce Bochy said of the Dodgers in general and their 1-2 pitching punch in particular. "Those guys are really good."

The Giants bolstered their starting staff earlier in the day with the acquisition of right-hander Jake Peavy from the Boston Red Sox for two minor leaguers. Peavy will pitch the series finale Sunday night.

First baseman Adrian Gonzalez sprayed two doubles among three hits and third baseman Juan Uribe drove in two runs with two hits, including an RBI double that capped a two-run sixth inning, as the Dodgers ran their record against NL West opponents to 31-18 this season.

In winning for the ninth consecutive time, Kershaw (12-2) allowed a single to the second batter he faced -- Giants center fielder Gregor Blanco -- but then didn't allow another hit until after his teammates had staked him to a 5-0 lead in the seventh inning.

The L.A. ace struck out seven, walked one and boosted his career record against the Giants to 12-5 with his 15th consecutive quality start in the matchup.

"It's a pitchers' ballpark for sure," Kershaw said of AT&T Park, where he now sports a 0.69 ERA in 10 starts. "Big gaps (in the outfield). We have guys who can run it down out there."

The complete-game shutout was Kershaw's second of the season. His nine-game winning streak is the first for a Dodgers starter since right-hander Kevin Brown accomplished the feat in 2003.

"It's always good to be in first this late," he said of the change atop the NL West. "We know that they are going to be right there with us at the end. We have to win (Sunday night) to stay in first. That has to be our mindset."

After Giants right-hander Ryan Vogelsong battled Kershaw in a scoreless tie for three innings, the Dodgers scored in four consecutive turns at bat, amassing all 11 of their hits in those innings.

Gonzalez and Uribe both doubled in the two-run sixth, an inning in which both runs were unearned because of a throwing error by Giants second baseman Dan Uggla on a play at the plate.

"Today is was Gonzo (Gonzalez). Yesterday it was (Yasiel) Puig," Uribe said of the Dodgers' balanced attack. "Everybody helping the team is good. That's what happens when your team is good."

Shortstop Hanley Ramirez also had two hits for the Dodgers, who used the same winning formula -- relentless hitting and dominant pitching -- in a one-sided win similar to Friday's 8-1 thrashing behind Greinke in the series opener.

Vogelsong (5-8) suffered his fifth consecutive loss, allowing four runs (two unearned) and eight hits in six innings. He walked one and struck out four.

The Giants, who have now lost 18 of their last 24 at home, have not scored a run with Vogelsong in the game in any of his five straight losses.

"He was good," Giants leadoff hitter Hunter Pence said of Kershaw. "He's always good."

Left fielder Michael Morse had the Giants' only hit in the final eight innings against Kershaw, a single up the middle in the seventh.

NOTES: The 15 consecutive quality starts for LHP Clayton Kershaw against San Francisco is the most for a Giants opponent since RHP Bob Gibson had 16 straight from 1968 to 1972. ... Dodgers 1B Adrian Gonzalez's three hits gave him 138 in his career against San Francisco, tying him with Miami Marlins SS Rafael Furcal for the most among active players. ... The two hits for the Giants were a season low. ... RHP Jake Peavy, who will make his Giants debut in the nationally televised series finale Sunday night, has owned the Dodgers in the past, posting a 14-2 record and a 2.21 ERA in 25 starts. The 2.21 ERA is the best against the Dodgers among all active major league starting pitchers. ... The two players dealt to the Boston Red Sox in order to acquire Peavy pitched for the Giants' Triple-A affiliate in Fresno this season. RHP Heath Hembree, 25, compiled a 3.89 ERA in 41 relief appearances and LHP Edwin Escobar, 22, was 3-8 with a 5.11 ERA in 20 starts. ... In other to make room for Peavy on the roster, the Giants announced after the game that they'd sent RHP George Kontos to Triple-A Fresno. ... The Giants made another transaction Saturday, placing backup C Hector Sanchez on the seven-day disabled list with a concussion and promoting C Andrew Susac to take his place. Susac made his major league debut when he entered the game in the eighth inning and grounded out in the ninth in his first at-bat.