Updated

Clayton Kershaw tossed eight innings of one-run ball in the Los Angeles Dodgers' 5-1 win over the San Francisco Giants in the regular season finale.

Kershaw (14-9) fanned eight, scattered three hits and walked three for Los Angeles (86-76), which was eliminated from playoff contention on Tuesday due to its loss in the second tilt of this three-game set.

"I just want to pitch and it was fun today," Kershaw said. "Not making the postseason never feels good, but we have a lot of expectations for next season."

The 24-year-old left-hander finished the season with an MLB-best 2.53 ERA and 229 strikeouts, one behind the New York Mets' R.A. Dickey for the major league lead.

Alex Castellanos and Juan Rivera homered in the win.

Clay Hensley (4-5) allowed the go-ahead run to score in the sixth and took the loss.

The NL West-winning Giants (94-68) will open the playoffs at home on Saturday at 9:37 p.m. (et) against the Cincinnati Reds.

"It's been a good year, but we still have some work to do. It's time to get ready for the playoffs," Giants manager Bruce Bochy said.

Giants starter Ryan Vogelsong was perfect throughout 4 2/3 frames, but the Dodgers plated a run in the fifth and sixth to take the lead.

Vogelsong lost the perfect game when Luis Cruz blooped one into shallow right field that second baseman Marco Scutaro was unable to handle for an error.

Just one batter later, the no-no was gone following back-to-back singles to center field by Tim Federowicz and Kershaw, with the latter plating Cruz.

Adrian Gonzalez's two-out RBI single off Hensley in the sixth gave the Dodgers a 2-1 advantage.

A pair of pinch-hitters then went deep for Los Angeles in the eighth.

Castellanos smacked a one-out solo homer to left field and Rivera added a two-run shot to center two batters later to make it a 5-1 game.

The Giants struck first in the fourth. Scutaro singled with one out, moved to third on Pablo Sandoval's double to left field and scored when Buster Posey grounded out to shortstop.

Game Notes

Scutaro extended his hitting streak to 20 games, while Gonzalez has now hit in 15 consecutive contests ... Kershaw improved to 8-4 lifetime against San Francisco.