Emmanuel Macron has held off a challenge from far-right leader Marine Le Pen to retain the French presidency.

His win makes Macron the first French President to win a second term in two decades, however, the far-right was closer than ever. The margin between the two candidates, while enough to secure a comfortable win, is narrower than in the 2017 polls, when Macron won by more than 30 percentage points to become France's youngest president.

As per France’s Ministry of Interior website, Macron received 58.5 percent, with 18.8 million votes, while Le Pen stood at 41.5 percent with 13.3 million votes. In the 2017 polls, the two candidates stood at 66.1 percent with 20.7 million votes and 33.9 percent with 10.6 million votes.

In a victory speech at Paris' Champ de Mars, Macron thanked his supporters and promised a more "independent France" and "stronger Europe."

“I also know that many of our compatriots voted for me today, not to support the ideas I hold but to block those of the extreme right," he said. "And I want to thank them here and tell them that I am aware that this vote binds me for the years to come."

"From now on, I am no longer the candidate of one camp but the president of all,” he added.

As for Le Pen, this is her third defeat in the country’s presidential race, having previously contested in 2012 and 2017. Undoubtedly this would be a bitter pill to swallow, with all her attempts to soften her image, distancing herself and the party from the legacy of the party founder, her father Jean-Marie Le Pen.