|L.A. Dodgers (13-17)||0||0||0||0||0||0||0||3||0||3||8||0|
|San Francisco (19-12) «||1||0||1||0||2||0||0||0||x||4||9||0|
SAN FRANCISCO -- Giants ace Matt Cain didn't make much of his first victory this season, even though it completed a series sweep of divisional rival Los Angeles.
Ending a two-week drought by San Francisco's starting pitchers meant more to the three-time All-Star.
|More on Dodgers-Giants|
Weekend Buzz: Cardinals' pitching mowing through NL
|More MLB coverage|
"All of the starters, we just hadn't been throwing the way that we wanted," said Cain, who struck out four and walked three. "All of us wanted to get us off that little skid that we were on. It just took some time."
Cain, who pitched six shutout innings against Los Angeles on opening day, gave up one run and five hits in 7 1/3 innings and allowed only one runner past second base to win for the first time since Sept. 26, 2012.
He left to a standing ovation from the AT&T Park crowd after issuing a one-out walk in the eighth, then watched from the dugout as five relievers teamed for the final five outs.
It's the first win by any San Francisco starting pitcher since April 21 -- an 11-game stretch.
"It took us a while ... but it was what we needed," Giants manager Bruce Bochy said. "He got us into the eighth inning, and as usual our boys are entertaining and made it close again. But I was happy for Matt the way he threw the ball."
Sergio Romo worked the ninth for his 12th save, tied for most in the majors.
The Giants extended their season-high winning streak to six games and defeated Los Angeles rookie Hyun-Jin Ryu for the second time this year.
Cain acknowledged the winless streak had begun to wear on him.
"It wasn't something I was proud of," Cain said. "I just wasn't pitching well for the guys. I needed to step it up."
The Dodgers couldn't get out of AT&T Park fast enough. They were the only visiting NL team with a winning record at the Giants waterfront ballpark before the series but are now 60-60 since the stadium opened in 2000.
"I feel better about our club walking out of here right now than I did walking in," said Los Angeles manager Don Mattingly, whose team has dropped three consecutive one-run games. "We played them tough the whole series. I feel great about coming out of here."
The Giants won the first two games of the series on game-ending home runs but didn't need any late dramatics this time, though the Dodgers made it close with three runs in the eighth.
San Francisco took an early 2-0 lead off Ryu and made it hold up behind Cain (1-2) and five relievers.
It didn't help that Mattingly had to scratch first baseman Adrian Gonzalez from the lineup with a sore neck less than an hour before first pitch. Gonzalez, who was also scratched from the first two games of the series, delivered a pinch hit two-run single in the eighth before leaving for a pinch runner.
Ryu (3-2) has been one of the most consistent pitchers for Los Angeles except against San Francisco. He gave up 10 hits and three runs while taking the loss in his majors debut on April 2, then allowed eight hits and four runs over six innings in the rematch.
The Giants opened with three consecutive singles off Ryu in the first but the Dodgers right-hander got out of it allowing only one run. Scutaro scored on Pence's fielder's choice grounder after Buster Posey hit into a forceout at home. Ryu then retired Francisco Peguero on a fly ball to end the inning.
Pence, who was hitting only .211 with runners in scoring position, doubled Scutaro home in the third then hit a two-run double in the fifth to drive in Pablo Sandoval and Posey.
After Cain walked Matt Kemp in the eighth, A.J. Ellis singled off reliever George Kontos and Juan Uribe walked. Gonzalez followed with a two-run single to center and Uribe scored on an infield hit by Dee Gordon to make it 4-3. Jean Machi got pinch hitter Jerry Hairston to ground out with the tying run at second base to end the inning.
|Hunter Pence doubles twice and drives in all four of his team's runs to help the Giants take over first in the NL West. (Getty Images)|
|Players of the Game|
|Los Angeles Dodgers|
|Carl Crawford , LF||5||0||1||0||0||0||1||.311||.383||.495|
|Nick Punto , 2B||5||0||0||0||0||1||2||.353||.441||.392|
|Matt Kemp , CF||3||1||1||0||2||1||0||.263||.323||.342|
|Andre Ethier , RF||4||0||1||0||0||1||4||.250||.350||.385|
|A.J. Ellis , C||4||1||2||0||0||0||0||.281||.390||.404|
|Juan Uribe , 1B||3||1||1||0||1||0||2||.238||.407||.381|
|Luis Cruz , 3B||3||0||0||0||0||0||3||.091||.116||.091|
|a-Adrian Gonzalez , PH-1B||1||0||1||2||0||0||0||.337||.398||.500|
|Justin Sellers , PR||0||0||0||0||0||0||0||.191||.267||.250|
|Dee Gordon , SS||3||0||1||1||1||0||1||.429||.556||.714|
|Hyun-Jin Ryu , SP||2||0||0||0||0||2||1||.286||.286||.357|
|b-Skip Schumaker , PH-LF||1||0||0||0||0||0||0||.146||.293||.167|
|Jerry Hairston Jr., PH-LF||1||0||0||0||0||0||2||.255||.304||.353|
|a-Singled for L Cruz in the 8th.|
|b-Grounded out for H Ryu in the 7th.|
|2B - M Kemp (6)|
|RBI - A Gonzalez 2 (22); D Gordon (3)|
|SB - C Crawford (6); D Gordon (3)|
|Los Angeles Dodgers|
|Hyun-Jin Ryu (L,3-2)||6.0||8||4||4||2||2||0||3.71|
|San Francisco Giants|
|Andres Torres , CF||4||0||3||0||0||0||0||.271||.306||.390|
|Marco Scutaro , 2B||4||2||2||0||0||0||1||.261||.320||.333|
|Pablo Sandoval , 3B||3||1||1||0||1||0||2||.331||.366||.479|
|Buster Posey , C||3||1||1||0||1||0||4||.292||.402||.521|
|Hunter Pence , RF||4||0||2||4||0||1||2||.280||.316||.472|
|Francisco Peguero , LF||4||0||0||0||0||1||5||.167||.167||.333|
|Guillermo Quiroz , C||4||0||0||0||0||1||0||.308||.400||.615|
|Brandon Crawford , SS||3||0||0||0||0||1||0||.250||.325||.481|
|Matt Cain , SP||3||0||0||0||0||1||0||.000||.000||.000|
|2B - H Pence 2 (7)|
|RBI - H Pence 4 (19)|
|CS - A Torres (1)|
|San Francisco Giants|
|Matt Cain (W,1-2)||7.1||5||1||1||3||4||0||5.57|
|Sergio Romo (S,12)||1.0||0||0||0||0||0||0||1.72|
|Attendance - 41140|
|Game Time - 2:53|
|Temperature - 63|
|Umpires - Home - Field Culbreth, First Base - Bill Welke, Second Base - Joe West, Third Base - Adrian Johnson|