Daniel Murphy (R) of the New York Mets

The New York Mets punched their ticket to the National League Championship Series for the first time since 2006 with a 3-2 win over the Los Angeles Dodgers.

Second baseman Daniel Murphy on Thursday belted the go-ahead home run as the Mets won the decisive fifth game, advancing to face the Chicago Cubs in a best-of-seven series with the winner getting a berth in the 2015 World Series.

Game one of the Mets-Cubs series is Saturday at Citi Field in New York. The Cubs won all seven contests between the two during the Major League Baseball regular season, outscoring New York 27-11.

The Mets allowed two runs in the first inning to erase a one-run lead but then they held the Dodgers scoreless over the next eight innings.

Murphy's sixth-inning home run to right field off Dodgers ace pitcher Zack Greinke, was his third of the series.

Mets starter Jacob deGrom struggled in the early innings allowing two runs in the first, but battled through to get the victory in the winner-take-all contest.