Until just a few months ago, Emmanuel Macron was a minor figure in French national politics and relatively unknown to voters. On Sunday, he defeated far-right National Front leader Marine Le Pen in the country’s presidential election with a decisive lead.

Macron’s rise is one of the more unpredictable aspects of an election campaign that has been mired in bizarre scandal and controversy. At 39 years old, he will be the youngest leader in modern French history, and its first to not come from an establishment party.

Macron is a former member of the Socialist Party who served as economy minister for just two years under President Francois Hollande, and was a banker for Rothschild & Company prior to entering politics. Before the presidential election, he had never run for elected office.

Despite Macron’s lack of experience, his newly founded political movement, En Marche! ― or “Onward!” ― rapidly gained supporters. He took a radical message of criticizing France’s political class as ineffectual and corrupt, but applied it to a restrained centrist platform based mostly on moderate economic reforms. It was an odd combination, but these are odd times in French politics.

As support for the Socialist left crumbled and corruption allegations hobbled the conservative Republicans ― two parties that have made up France’s political establishment ― France’s presidential election campaign opened. On April 30, Macron and Le Pen made it through the first round of the vote, advancing to the runoff on May 7. The two rivals shared an outsider status, but had radically different visions for France’s future.

Le Pen had vowed to take France out of the eurozone and return to the franc as a national currency. She said she’d hold a referendum on European Union membership, as well as introduce anti-Islam and anti-immigration policies. Mimicking the campaign of U.S. President Donald Trump, she promised to pursue a “French first” agenda, and her election would have been a devastating blow to the EU.

Macron, on the other hand, ran as a moderate reformer and called for France to take a leading role in reinvigorating the EU. He tried to pull usually polarized French politics to the center at a time when far-right populist parties across Europe are becoming increasingly prominent. His victory is a relief for pro-EU figures like German Chancellor Angela Merkel who have become frequent targets for the far-right amid the refugee crisis and Brexit.

Charles Platiau / Reuters Emmanuel Macron, head of the political movement En Marche!

Macron’s candidacy was initially dismissed as a sideshow when he announced in November of last year that he would enter the race. At the time, it was assumed that whoever won the Republican Party primary would have a fairly clear road to the presidency. But Republican candidate Francois Fillon had a disastrous campaign and faced a formal investigation to see whether he paid his family hundreds of thousands of euros in taxpayer money for jobs they never actually worked.

In addition to Fillon’s woes, deeply unpopular Hollande of the Socialist Party was not seeking a second term ― something that no French leader has done since the nation’s fifth republic was created in 1958. Hollande’s administration has left the traditionally powerful Socialists in shambles and their candidate Benoit Hamon suffered a disastrous defeat in the first round.

The French press has also given much exposure to the charismatic Macron, leading other party officials to accuse them of playing favorites. The tabloids, meanwhile, additionally homed in on Macron’s relationship with his wife Brigitte, who is his former high school teacher and 24 years his senior. The two appeared on the cover of Paris Match magazine numerous times, and he has routinely been made to defend their relationship in interviews.

In one of the more bizarre twists of the election campaign, Macron was forced to deny that he was secretly gay and having an affair. The story originated after a conservative French lawmaker made the allegations in an interview with Russian state-run media.

POOL New / Reuters Left to right, French presidential election candidates Francois Fillon, Emmanuel Macron, Jean-Luc Melenchon, Marine Le Pen and Benoit Hamon.

Although Macron had gained exposure through the press and his use of social media, it is the fractured state of French politics that has been key to his rise. While France’s Republican Party has moved to the right in terms of some of its policies, Macron has targeted voters left behind in the shift and sought to appeal to a broad base of political views. In an interview with Britain’s Channel 4 in March, Macron described what he sees as the error of politicians attempting to copy the far-right’s platform in order to undercut its popularity.

“When some people decide to go in the Front National’s direction on the political spectrum, that’s a big mistake. That’s a big mistake because they always prefer the original to the copy,” Macron said.

This story was originally published on March 22, 2017, and was updated on May 7 following the French presidential election.