San Francisco Giants starter Madison Bumgarner outpitched Clayton Kershaw to lead his team to a 4-2 win over the Los Angeles Dodgers.

Bumgarner (12-9) got the victory in Friday night's much-anticipated pitching match-up at Dodger Stadium after allowing just five hits and two earned runs in six innings of work.

He was taken out of the game after the Giants had rallied in the top of the seventh inning to take a 3-2 lead.

The biggest blow was a two-run single by first baseman Brett Pill off of Kershaw, who had shut out the Giants through six innings but gave up four straight hits leading to three runs in the seventh.

The Giants tacked on an insurance run in the top of the eighth inning when right fielder Hunter Pence hit a solo round-tripper off of Dodgers reliever Chris Withrow.

Both of the Dodgers' runs came on a two-run homer by third baseman Juan Uribe in the bottom of the sixth inning.

Kershaw (14-9), whose record this year does not reflect his stellar 1.94 ERA, took the loss after working seven innings and giving up three runs - two of them earned - on eight hits.

Despite the loss, the Dodgers (86-61) maintained their 12.5-game lead over the second-place Arizona Diamondbacks in the National League West division with just over two weeks remaining in the regular season.

For the 2012 World Series champion Giants (67-81), who were mathematically eliminated from playoff contention earlier this week, the win over their arch-rivals was a rare bright spot in a disappointing season. EFE