The first round of France's presidential election came after a rollercoaster campaign with multiple twists and turns.
Centrist Emmanuel Macron and far-right Marine Le Pen emerged as the two leading candidates set to contest a May 7 run-off vote, according to initial projections.
Here AFP lists seven key moments that have defined one of the most unpredictable electoral contests in decades:
- Primary upset -
The first came in November when 63-year-old former premier Francois Fillon pulled off a come-from-behind victory in the right-wing primary, defying pollsters who had for months predicted a win for Alain Juppe, 71.
Fillon's upset was put down to strong performances in TV debates, as well as what was then a scandal-free image compared with Juppe and his other key rival, former president Nicolas Sarkozy.
- Hollande ducks out -
The spotlight quickly shifted to turmoil on the left, which was waiting impatiently for President Francois Hollande to decide whether to stand for re-election despite disastrous approval ratings.
The Socialist leader had staked his presidency on turning around France's moribund economy, in particular on reining in an unemployment rate that has remained stuck at around 10 percent throughout his five years at the helm.
Hollande finally ducked out on December 1.
- Scandal hits Fillon -
In mid-January, the race for the presidency seemed to be a duel between Fillon and anti-immigration far-right leader Le Pen.
At the time, Macron, a former economy minister under Hollande who had quit in August to launch an independent centrist bid for the presidency, was just beginning to get traction in the race.
On January 25, the satirical and investigative newspaper Le Canard Enchaine dropped a bombshell on Fillon and "Penelopegate" was born.
Revelations that the former prime minister had put his wife Penelope on the public payroll with very little work to show for it would eventually lead to criminal charges being brought against Fillon for abuse of public funds.
A Fillon spokesman said Sunday his failure to make it into the second round was a "huge disappointment".
- Socialists reject Valls -
A new surprise was in store as the ailing Socialists held their primary contest in late January which many analysts tipped pro-business former prime minister Manuel Valls to win.
Instead, 49-year-old Benoit Hamon, a diehard leftist who advocates a universal basic income, trounced his former boss in the two-round contest.
The former education minister's win was seen as a repudiation of controversial economic reforms rammed through parliament last year under Valls.
Hamon's poll numbers have plunged, and he currently stands at 7.5 percent, according to an Ipsos survey out Friday.
- Macron breaks through -
By early February, the 39-year-old Macron began polling better than Fillon with his bid to shake up French politics as a candidate of "neither the left nor the right".
The former investment banker hoping to become France's youngest postwar president was once dismissed as a flash in the pan but has gone on to consolidate his status as the man to beat.
The pro-business europhile began filling arenas, finding support from Socialists deserting their crumbling party as well as a broad array of people seeking new ideas.
On Sunday, he emerged in the lead of the first round vote, along with far right Front National leader Marine Le Pen.
- Melenchon surges from the left -
In the past three weeks, Communist-backed Jean-Luc Melenchon -- who has steadfastly refused to join forces with Hamon to form a united front for the left -- surged in the polls.
The charismatic 65-year-old, who has tapped into widespread disillusionment with the political class, bounded ahead after strong debate appearances and quirky campaign stunts such as the use of holograms.
In the final weeks, polls showed the gap closing between frontrunners Macron and Le Pen and the chasing duo of Fillon and Melenchon, making the race highly unpredictable.
But on Sunday Macron and Le Pen emerged as the two leading candidates in the race to go through to the May 7 run-off vote, according to initial exit polls.
- Terror strikes in home straight -
Just as candidates were making their final pitches to voters in a televised interview show on Thursday evening, 39-year-old Karim Cheurfi shot dead a policeman on Paris's iconic Champs Elysees before he himself was shot dead by police. A note praising Islamic State (IS) was found near his body.
The killing forced security to the top of the agenda.
Polls had shown voters were more concerned about jobs and wages, but analysts said an attack in the late stages of the campaign could help Le Pen or Fillon.