Emmanuel Macron has won the first round of the French election and for a second time will fight far-right leader Marine Le Pen for the presidency on 24 April.
“Make no mistake, nothing is decided,” he told cheering supporters.
Although he is heading for a first-round lead of almost five points, opinion polls suggest the run-off will be far closer than that.
Ms Le Pen called on every non-Macron voter to join her and “put France back in order”.
Opinion polls released on Sunday night give Mr Macron a lead as low as two points.
Veteran far-left agitator Jean-Luc Mélenchon finished narrowly behind Marine Le Pen in third and he now has the unlikely role of kingmaker.
“You must not give a single vote to Marine Le Pen,” he warned his supporters, but unlike other candidates, he did not back the president. Although Mélenchon voters could decide the election, many of them may just sit the second round out.
Although 12 candidates were in the running, they were the only three who polled more than 10% as the idea of tactical of “useful” voting took hold.
The 2022 presidential election will be partly remembered for the disaster that has befallen the two old parties that used to run France, the Republicans and Socialists. They sank almost without trace, with Socialist Anne Hidalgo falling below 2%.
It was only a few months ago that Valérie Pécresse was still in the race for the right-wing Republicans. She performed so badly her party could barely scrape the 5% needed to claim its election costs.
The battle for votes now starts in earnest. Marine Le Pen can count on supporters of Eric Zemmour, whose more hardline nationalism gave him fourth place and 7%. Nationalist Nicolas Dupont-Aignan has also backed her.
Most of the other candidates on the left have backed Mr Macron, as did Valérie Pécresse, but one-time Socialist candidate Ségolène Royal said the president now had to “earn” victory.
Ifop pollster François Dabi said his company’s 51%-49% estimate was the closest they had ever predicted. A BFMTV poll put the gap at 52%-48% and an Ipsos poll suggested it was slightly wider.
Addressing his supporters, Mr Macron looked a relieved man and he promised to work harder than in the first part of the campaign. He only started campaigning eight days before, his mind more focused on Russia’s war in Ukraine.
“When the extreme right in all its forms represents so much of our country,” he said, “we cannot feel that things are going well.”
He addressed Le Pen voters too: “I want to convince them in the next few days that our project answers solidly to their fears and challenges of our time.”
Ms Le Pen said there was a fundamental choice on 24 April of two opposite views: “Either division and disorder, or a union of the French people around guaranteed social justice.”
One in four young voters backed the president, although more than one in three 18-24 year-olds opted for Jean-Luc Mélenchon, according to Elabe pollsters.
Marine Le Pen performed best among 35-64 year-olds, while the president was favoured by over-65s.