SAN FRANCISCO — Justin Maxwell, robbed of a big hit in his previous at-bat, singled home the winning run with one out in the 10th inning and the San Francisco Giants beat the Los Angeles Dodgers 3-2 Thursday for a three-game sweep.
A day after the Giants edged the Dodgers by the same 3-2 score with a run in the ninth, San Francisco again frustrated the Dodgers.
The Giants rallied in the ninth of the series finale, scoring the tying run when Casey McGehee led off with a single and Brandon Crawford tripled against Joel Peralta.
Juan Nicasio (0-1) gave up a single to Angel Pagan to open the 10th and got Buster Posey on a fly out. Pagan stole second base and Brandon Belt was walked intentionally ahead of Maxwell.
Santiago Casilla (2-0) pitched the 10th for the win as the Giants swept the Dodgers at home for the first time since May 2013. The defending World Series champions have won four of five following an eight-game losing streak.
The Dodgers had brought a seven-game winning streak into AT&T Park this week.
Pagan, Maxwell and Joe Panik each had two hits for the Giants.
Alex Guerrero homered and singled and is batting .474 (9 for 19) with four homers and 12 RBIs for the Dodgers. Adrian Gonzalez also homered.
Dodgers second baseman Howie Kendrick made a diving catch in the eighth that preserved the slim lead. The Giants had the bases loaded with two outs when Maxwell hit a line drive up the middle that Kendrick snared just off the ground.
Los Angeles starter Mike Bolsinger, who did not allow a run in 11 minor league innings, took a shutout into the sixth. He finished allowing one run on five hits. He walked two and struck out five.
Bolsinger, the reigning PCL Player of the Week, was recalled from Triple-A Oklahoma City to make the start.
Giants starter Ryan Vogelsong gave up two runs on three hits in six innings. He walked one and struck out five.
In the sixth, Bolsinger gave up a one-out walk to Panik and a single to Pagan. After Posey struck out, Belt singled home a run.
Dodgers: C A.J. Ellis, pulled from Wednesday's loss with a bruised right hand, did not play. X-rays were negative and he's expected to be ready by Friday.
Giants: OF Hunter Pence (fractured left forearm) is swinging off a tee with a wood bat. He had been using a wiffle bat. ... RHP Erik Cordier (right forearm strain) has made three rehab appearances for Single-A San Jose, totaling three scoreless innings with seven strikeouts. INF Travis Ishikawa (lower back strain) had a setback and will be rested.
Dodgers: RHP Zack Greinke (2-0, 1.83) takes the mound against the Padres in San Diego on Friday. He's 2-0 in with a 1.74 ERA in five career starts at Petco Park.
Giants: RHP Chris Heston (2-1, 0.87) gets the start against the Colorado Rockies on Friday in Denver. Heston is the first Giants rookie to start a season with outings of at last six innings and one or fewer earned runs since 1914.