LOS ANGELES -- Clayton Kershaw had to be borderline perfect against the San Francisco Giants on Friday considering the watered-down Los Angeles Dodgers lineup playing behind him.
He wasn't quite up to the task.
One bad inning and another slow night by his offense did in the Dodgers' ace, and the Giants parlayed a three-run seventh inning into a 4-2 win at Dodger Stadium.
Thanks to the Arizona Diamondbacks' 7-5 loss to the Colorado Rockies, the Dodgers' magic number to clinch the National League was reduced to four. However, the Dodgers will be unable to celebrate their title at home Sunday before hitting the road for 10 games.
"It should've been three," Kershaw said. "That's unfortunate on my part. Hopefully we can close it out soon."
Kershaw (14-9) was good but not great, his undoing arriving in the seventh when the Giants tagged him for three runs on four hits. The big blow was Brett Pill's two-run single that put San Francisco ahead 3-2.
He went into the inning leading 2-0 after Juan Uribe tagged Giants' starter Madison Bumgarner with a two-run home run in the sixth.
"I've got to make the lead stand up right there." Kershaw said.
Each of the Giants hits in the decisive inning -- all on successive at-bats -- were singles. Hunter Pence and Pablo Sandoval got things started, then Joaquin Arias had an RBI single to left-center, and Pill followed with a two-run blooper to right field.
"It was really just one bad inning," Dodgers manager Don Mattingly said. "But for me it was the best he's thrown the ball in three or four outings."
Pence added a solo home run off Dodgers reliever Chris Withrow in the eighth to extend the lead to 4-2.
Sergio Romo worked around two singles to open off the ninth, closing out the win for the Giants. He struck out Yasiel Puig, got Nick Punto to ground into a fielder's choice and induced Adrian Gonzalez to ground out to third to seal his 34th save.
"Just throw your best stuff," Romo said of the hard-earned save. "You're in a position where if you've got to get beat, get beat with your best stuff. I just went at them. All in all it was a battle. I had to bear down. Those guys are no joke."
Kershaw allowed three runs (two earned) in seven innings. He gave up eight hits and no walks while striking out six.
"Breaks didn't go our way today," Kershaw said. "It's my fault. Against a good pitcher like Bumgarner, you've got to make two runs hold up."
With Hanley Ramirez out due to an irritated nerve in his back and Gonzalez and Carl Crawford sitting out the start, the Dodgers' lineup lacked considerable pop.
However, Uribe, a former Giant, took matters into his own hands by stunning Bumgarner with a two-out, two-run home run in the sixth to put Los Angeles on top 2-0.
Michael Young, playing first base in place of Gonzalez, set it up by hustling to beat out an infield single with two outs to extend the inning. Uribe then hit his 11th home run of the season.
Bumgarner (12-9) threw six innings of two-run ball. He struck out six, walked two and gave up five hits.
"You know when you're going up against a guy like (Kershaw) you have to keep it close or at least a tie," Bumgarner said. "Anytime you're behind facing a guy like him, you know you don't have too good of a chance. But the offense picked me up after I gave up the homer."
NOTES: Ramirez underwent an MRI exam Friday after leaving Thursday's game with tightness in his left hamstring. The results revealed an irritated nerve in his back. Ramirez received a cortisone shot in the back and is expected to return sometime next week. Ramirez dealt with a similar issue in 2011 with the Florida Marlins. ... San Francisco's streak of 13 consecutive games without committing an error ended Thursday night against the Dodgers. According to the Elias Sports Bureau, it was the Giants' longest errorless streak in modern history (since 1900).