Miracles can happen in the second round of a French presidential election and on Sunday's figures Nicolas Sarkozy needs one. The incumbent needed to stay ahead of his socialist challenger in the first round to have a chance of beating him in two weeks. This was because his pool of rightwing votes from the other defeated first-round candidates was always going to be smaller than François Hollande's. Even if Mr Sarkozy had stayed in pole position with around 30% of the vote, it was going to be tough. He would have needed eight out of 10 far-right Marine Le Pen voters and six out of 10 centrist Francois Bayrou voters to turn to him to have a chance of retaining the presidency. A president seeking re-election has never come second in the first round and won.

But consider what he actually got. Coming second on about 26% of the vote makes the search for the extra votes from the extreme right and the centre that much more desperate. On almost 29%, Mr Hollande is not only the front runner, but on the crest of a leftwing wave. Add together the result of the main leftwing candidates and the left has got more than 42% of the vote – the first time it has achieved that result since 1988. From the left and the right, the message of this election was that France had had enough of its president.

As the loser of a national referendum on him as leader, Sarkozy will need to conduct a highly personalised and vituperative campaign in the next two weeks against the socialist victor François Hollande's lack of leadership experience in order to turn around this personal vote of disapproval on him. This he had already started to do in his last rallies, in which he presented himself as the protector that France needed in times of crisis. The voters did not buy it, so it will be hard for him to botox life into his failing political brand. He will try to do so in the television debate just before the second and final round of voting. Hollande's senior aides are more than relaxed about this. The more aggressive Mr Sarkozy becomes, the less presidential he will look.

But the left's confidence that the presidency was, after 17 long years, finally within its grasp was tempered by the stunning success of Marine Le Pen. On almost 20% of the vote, she achieved the best result for the far-right Front National by some distance, easily outpacing her father Jean-Marie's shock result of 16.86% in the first round in 2002. In so doing, she has turned a party that was labelled extremist and had difficulty gaining access to the national media into a populist and republican party. Her success, however, is not Sarkozy's. She now wants to convert that electoral success into a sizeable presence in the French national assembly. Voting for a losing president and yesterday's man would not necessarily be in her party's interest.

Her success represents a setback for the man who shot to fame during the campaign, Jean-Luc Mélenchon. If he has failed in his primary objective of prising the working-class vote from the far right and displacing Marine Le Pen for third place, at least he can console himself with the fact that his Front de Gauche has united the far left and tripled its vote since the start of the campaign. If the rise of the far right fractures the right and deals a body blow to the centrist vote of François Bayrou, who failed to get into double figures, it will unite the far left. The Front de Gauche will have every interest in urging its voters to unite behind Mr Hollande, arguing their job is not done until Mr Sarkozy is turfed out of power. The same logic will apply to most of Bayrou's centrist voters.

This election was more than just a personal defeat for a president whose personality the French have had enough of. It was also about social justice, accountability for the banking crisis and the wish to see an alternative to a decade of austerity. But here the message is still mixed. The pro-Brussels vote is still twice the size of the eurosceptic one and on this alone Germany's leader Angela Merkel can take heart. France wants Europe to change course, but it does not want the project to fail.