SAN FRANCISCO -- Clayton Kershaw pitched the big-money Dodgers to their third straight NL West title, tossing a one-hitter as Los Angeles beat the San Francisco Giants 8-0 on Tuesday night.

Kershaw allowed just a third-inning single and struck out 13, and now he'll get a chance to erase those sour postseason memories as the Dodgers (88-69) advance to face the NL East champion New York Mets in a best-of-five Division Series.

Kershaw (16-7) finally got the best of his 2015 nemesis in the fourth matchup of the year against World Series MVP Madison Bumgarner, striking out the side in order three times and retiring the final 19 batters as the Dodgers snapped a four-game losing streak.

"There's a little bit, if you don't win this one then you've got two more and you start getting a little nervous, you start panicking a little bit," Kershaw said. "We've still got something to play for. We're still trying to fight the Mets for home-field advantage. It's kind of a sigh of relief. We weren't playing that well."

Don Mattingly's Dodgers earned a third straight playoff berth for the first time in franchise history, and did so by snapping a seven-game losing streak at AT&T Park this year. It's also their sixth postseason berth in 10 years.

When Kelby Tomlinson grounded out to end it and rookie shortstop Corey Seager made a nice throw to first, Kershaw raised both arms in the air as his teammates streamed out of the dugout. They all began hugging and dancing on the mound.

"He knows what he needs to do against these guys," catcher A.J. Ellis said.

The Giants immediately offered a message on the main scoreboard: "CONGRATULATIONS, L.A. DODGERS! #RESPECTTHERIVALRY"

Los Angeles players stayed on the field for several minutes, pulling on their new NL West champion caps.

Justin Ruggiano and Ellis hit back-to-back home runs in the sixth to chase Bumgarner (18-9), denying the Giants their first 19-game winner in 18 years.

Andre Ethier added a two-run triple in a four-run eighth, and Los Angeles captured its 14th NL West title and earned their 29th playoff berth -- 20th in Los Angeles. Ellis and Seager added run-scoring singles that inning.

Los Angeles lost a four-game division series to St. Louis last October and the club hasn't reached the World Series since winning it all in 1988, losing in either the division series or NL Championship Series in its last eight postseason appearances since.

Now, with two of the top pitchers in the game, Zack Greinke and Kershaw, stellar rookies such as Seager and outfielder Joc Pederson, veteran infielder Jimmy Rollins and August acquisition Chase Utley leading a loaded bench, the Dodgers are counting on a deep October run.

"It's a fun mix, it's a talented mix and hopefully it's the right mix," Kershaw said.

They got this far with huge expectations under first-year President of Baseball Operations, Andrew Friedman, and new general manager Farhan Zaidi -- and with a whopping regular-season payroll of $285 million.

It took a few days longer than expected to secure their latest playoff berth after a surprising sweep by last-place Colorado at Coors Field over the weekend and a 12-inning loss Monday night. But, the way it worked out, the Dodgers got to celebrate on the home field of their rival at sold-out AT&T Park.

"They've won three out of the last five," Mattingly said. "You've got to earn it."

The only other time in the ballpark's 16-year history that a visiting team clinched a playoff berth or series here was the Dodgers when they captured the NL wild card on the second-to-last day in 2006.

Before the game, an impatient fan yelled to Los Angeles reliever Kenley Jansen, "Stop messing around!" To which Jansen fired back from the dugout: "We're not messing around. We tried to clinch three days ago."

The Dodgers ended their longest skid in San Francisco since June 12, 1961-April 16, 1962, when they lost a franchise-worst nine straight road games in the rivalry.

Kevin Frandsen's one-out single in the third was the Giants' first baserunner against Kershaw.

But the defending champion Giants miss the playoffs in another odd year following a World Series win for the third time in six years -- after their 2010, `12 and `14 titles.

The big lefty had been 2-0 with a 1.31 ERA in his previous 2015 outings opposing Kershaw, who had gone 0-2 with a 3.54 ERA in those starts.

He won't forget watching the Dodgers celebrate here.

"You take that, and you remember that feeling going into the offseason. It's not a good feeling," he said. "You don't want to be a part of that. You want to be the one celebrating. You let it give you a little bit of fuel for next year."

TRAINER'S ROOM

Dodgers: 2B Howie Kendrick returned to the starting lineup a day after sitting most of the night with tightness in his hamstring.

Giants: OF Nori Aoki will fly to Pittsburgh on Wednesday to be examined by renowned concussion specialist Dr. Micky Collins and if cleared still could be used off the bench as a pinch-hitter before season's end. ... Buster Posey, who caught Bumgarner, is likely to play 1B the rest of the way.

UP NEXT

Dodgers: RHP Mike Bolsinger (6-5) looks for his first career victory vs. San Francisco after going 0-3 with a 4.56 ERA in his first four starts.

Giants: RHP Mike Leake (10-10) is 2-4 with a 4.89 ERA in seven appearances and six starts lifetime against the Dodgers. He lost his lone start this year.