LOS ANGELES (AP) Two teams with plenty of history, just none against each other in the postseason, will decide who represents the National League in the World Series.

Faced with a winner-take-all scenario against the Los Angeles Dodgers on Thursday night, the New York Mets made the long trip back to California worth it and came through with a gritty 3-2 victory in Game 5 of the division series.

''We're going to enjoy this now and start thinking about the Cubs tomorrow,'' a bubbly-soaked David Wright said after the Mets celebrated in the Dodger Stadium clubhouse for the first time since the 2006 NLDS.

More from FoxSports

Now they face the Chicago Cubs in the best-of-seven NLCS that starts in New York on Saturday. Lefty Jon Lester is set to start Game 1 for the Cubs, likely facing New York's Matt Harvey. The Mets will be looking to reach the World Series for the first time since 2000.

''We've got a lot more to accomplish. Hopefully, we can do this two more times,'' outfielder Michael Cuddyer said. ''We've going to enjoy this now, but we know we've still got a tough Cubs team that we're going to have to play and it's going to be a hard-fought series. They're a good team and they're playing really well.''

Game 5 hero Daniel Murphy became only the second batter to homer off the Dodgers aces Clayton Kershaw and Zack Greinke this season, joining Kole Calhoun of the Angels.

''We earned it,'' Cuddyer said.

Murphy's homer off Greinke in the sixth inning Thursday night gave the Mets the 3-2 lead.

''The Dodgers had the home-field advantage with Kershaw and Greinke pitching four times in a best-of-five series. That's about as challenging as it gets,'' Wright said. ''I can't think of another team that has that type of 1-2, and we happened to win two games against those guys. That's an incredible feat, and we should be proud of that.''

Murphy had a hit in each of the five division series games, including a 3-for-4 effort in the clincher, and he finished the series 7 for 21 with a double, three homers and five RBIs.

''He's about as locked in as I've ever see him,'' Wright said. ''I mean, to be able to have this type of series and have those kind of at-bats against that pitching staff shows you how well he's seeing the ball and how dangerous he can be.''

Jacob deGrom, who won a 3-1 duel against Kershaw in Game 1 and tied Tom Seaver's franchise record for strikeouts in a postseason game with 13, yielded two runs and six hits in six innings and fanned seven in Game 5. He stranded a runner in scoring position in each of the first five innings.

DeGrom was 2-0 with a 1.38 ERA in two starts against the Dodgers in the series, and struck out 20 while walking four.

Noah Syndergaard, who lost to Greinke in Game 2, relieved deGrom and pitched a hitless seventh before Jeurys Familia posted the first six-out save of his career.

''It was just an incredible job by this team,'' Wright said. ''It seemed like down the stretch in September and October, somebody stepped up for this team every day - a new guy.

''Tonight was no different - Daniel Murphy stepping it up. DeGrom not having his best stuff but finding a way to win. Jeurys Familia coming in to get a six-out save. Syndergaard coming in out of the bullpen. I mean, this team understands that on any given day, somebody can step in and be that guy.''