Centrist politician Emmanuel Macron was projected to win the French presidential election on Sunday over far-right candidate Marine Le Pen, France's president and prime minister said.

"I called Emmanuel Macron tonight to congratulate him warmly on his election as President of the Republic," President Francois Hollande said in a statement.

Hollande said the large margin of victory confirmed that a majority of citizens had rallied around "the values of the Republic" and affirmed their support for the European Union.

French media reported that Macron won 65.9 percent of the vote and Le Pen gained 34.1 percent, citing results from the Ministry of the Interior.

French Prime Minister Bernard Cazeneuve announced Macron's win in a statement minutes after the last polls closed, according to the Associated Press.

Cazeneuve said that the vote "testifies to the lucidity of the voters who rejected the deadly project of the extreme right" and represented an embrace of the European Union.

Le Pen conceded defeat on Sunday evening, saying France had voted "for continuity." She said she had called Macron to congratulate him and "to wish him success."

The election follows an unprecedented race in which Macron and Le Pen offered two opposing visions of France's future, and the country's political landscape was reshaped after the outsiders pushed aside the two establishment parties, which have dominated French politics for the last fifty years.

The center-left Socialist Party candidate Benoît Hamon crashed out of the race after polling a paltry 6.4 percent in the first-round ballot on April 23, while the center-right Les Republicains candidate, François Fillon, failed to make it through on 20 percent of the vote.

Macron came out top on 24 percent and Le Pen came second polling 21.3 percent of the vote. Left-wing firebrand Jean-Luc Mélenchon finished with 19.6 percent.

Conceding defeat in the first-round ballot, socialist candidate Hamon and scandal-ridden Fillon threw their support behind Macron, condemning the nationalist right-wing views of Le Pen and her National Front Party. On Thursday Barack Obama waded into the election releasing a video expressing his support for Macron.

"The success of France matters to the entire world," the former president said in a video posted online and tweeted by the Macron's campaign. The candidate "appeals to people's hopes and not their fears," Obama added.

Macron, an ex-investment banker, economy minister and advocate of a free market clashes fundamentally with Le Pen, who ran a strident "French-first," anti-globalization campaign. Macron is pro-diversity while Le Pen is anti-immigration and has frequently targeted France's Muslim population.

It is only the second time a National Front candidate has made it through to the runoff. In 2002 when Marine Le Pen's father Jean-Marie Le Pen made it to the second-round French voters flocked to the polls to ensure he did not win, instead electing former President Jacques Chirac with a resounding 78 percent of the vote.

Last week in an effort to broaden her electoral base Le Pen temporarily resigned as leader of the National Front, rebranding herself solely as a presidential candidate. It was a final push to soften her image and disassociate herself from her father and some of his overtly anti-Semitic and racist rhetoric.

During the campaign she dropped her last name from campaign handouts, referring to herself simply as Marine and she changed the party's logo from a flame to a blue rose. But Le Pen has also at times fallen back into the older harsher style of messaging which reached fever pitch in a bitter pre-election debate last week.

In the ill-tempered head-to-head, broadcast live to upwards of 20 million viewers, Le Pen and Macron clashed in a series of angry exchanges.

Le Pen vilified Macron as a "smirking banker" who represented an unfettered globalisation. She also accused him of being complacent in confronting the threat of Islamist terrorism saying "you have no plan [on security] but you are indulgent with Islamist fundamentalism."

Macron retorted that terrorism would be his priority if elected and accused Le Pen of stoking civil war. "I will lead a fight against Islamist terrorism at every level. But what they are wanting, the trap they are holding out for us, is the one that you offer - civil war," he said.

National security has been a key battleground during the race, a sensitive issue in a country where more than 230 people have been killed by Islamist militants since 2015. A former soldier was arrested in the northwest region of Normandy on Friday on suspicion of planning a terrorist attack ahead of Sunday's election.

In the days before the first-round of voting in April, a gunman ambushed three Parisian police officers on the Champs-Elysees, killing one and wounding two others.ISIS claimed responsibility for the shooting and French President Francois Hollande said it was likely a terrorist attack.

In a last minute twist to the rollercoaster campaign Macron's political movement En Marche! said Friday that it had been hacked and internal information leaked in a cyber-attack hours before polls opened for the runoff.

En Marche! said it "was the victim of a massive and coordinated piracy action" and emails, accounting documents, contracts and other materials were disseminated on social media. It said part of the leak involves false documents.

The timing of the leak, hours before the statutory final-day campaigning and media ban came into effect, meant Macron was forced to rush-out a condemnation of the hack before regulation demanded he stopped commenting, leaving the contents of the documents open to online speculation.

France's electoral commission told media outlets Saturday not to reproduce any information hacked from Macron's campaign, warning that doing so would be a criminal offence.

It was not immediately clear who was behind the En Marche! cyber-attack. Last month, groups linked to Russia were accused of targeting Macron's campaign.

Despite Macron's win, France remains divided. The country is essentially split in four with no candidate managing to breach the 25 percent mark in the April 23 first-round vote.

And Macron's margin of support remains relatively slim and many question whether he will be able to govern in a system where the president's power rests on their ability to get laws through parliament.

Much will hang on June's parliamentary elections when France will decide whether to give their new president the power to legislate.