PARIS (Reuters) - French President Francois Hollande on Saturday warned against the risks of rising nationalism in his last New Year address ahead of the election of his successor next spring.

Hollande, who said this month he would not seek a second term in 2017, defended his legacy as president and addressed the policies of the anti-immigration and anti-euro National Front, whose leader Marine Le Pen is set to make it to the second round of the election, if recent polls are correct.

"There are periods in history when everything may change dramatically. We're in one of them," Hollande said an address that was broadcast on French television.

"How can we imagine our country being curled up behind walls, reduced to its internal market, going back to its national currency and, on top of that, discriminating between its own children according to their origins?" he said.

Hollande, who did not directly name the FN, mentioned British voters' decision in June to leave the European Union, and the U.S. presidential election won by Donald Trump in November, as events that demonstrated that democracy, freedom and peace were "vulnerable and reversible".

He also warned against the calling into question of the 2015 Paris agreement on climate change.

"France will not let anybody or any state, be it the biggest one, call into question this major achievement of the international community," Hollande said.

U.S. President-elect Trump has called global warming a hoax and has promised to quit the Paris Agreement, which was strongly supported by outgoing Democratic President Barack Obama.

Hollande's comments on Brexit in particular echoed those made earlier on Saturday by German Chancellor Angela Merkel.

Merkel, seeking a fourth term as chancellor in 2017, described 2016 as a year that gave many the impression that the world had "turned upside down".

In her address, she compared Brexit to a "deep incision" and said that even though the EU was "slow and arduous", its member states should focus on common interests that transcend national benefits.

Story continues

In a statement following Hollande's address, Le Pen brushed off his criticism.

"Talking of isolation for a project that, on the contrary, takes part in the flow of history, after Brexit and Donald Trump's election ... is a clear misunderstanding of the world's evolution and peoples' deep aspirations," Le Pen said.

(Reporting by Mathieu Rosemain and Emmanuel Jarry; Editing by Kevin Liffey and Diane Craft)