As the dust settles from Donald Trump’s surprise victory, last night was the first electoral test of the new era. France’s centre-right opposition party, also called the Republicans, voted in an open primary to choose its candidate for next year’s presidential election.

It was not a good omen for Trumpism, since in a shock result, centre-right voters ended the career of the most Trump-like of the candidates, former president Nicolas Sarkozy.

No one else, of course, runs as convoluted an electoral process as the Americans. France has no electoral college, just a nationwide ballot for president over two rounds, to be held next April and May. Both mainstream parties, the Republicans and the centre-left Socialists, also hold a national two-round vote to select their candidate.

This time around, however, there’s a strong expectation that the Socialists — whose incumbent president, Francois Hollande, is deeply unpopular — will be eliminated in the first round, and that whoever the Republicans choose will end up in the runoff facing not a candidate of the left, but Marine Le Pen of the far-right National Front.

If that happens, the Republicans’ candidate will depend upon Socialist voters turning out in the second round to support him or her in “republican solidarity” — just as they did in 2002, when Jacques Chirac won a landslide against Le Pen’s father.

With that background, the Republicans’ primary featured three leading candidates who were divided by a series of policy, tactical and personality differences. (See my preview of the race here)

Sarkozy, attempting a comeback after defeat by Hollande in 2012, was the candidate of the populist right, advocating for tough law and order policies and specialising in anti-Muslim rhetoric. He was also the one least hostile to the National Front, refusing to endorse any joint action with the Socialists against them.

Former prime minister Alain Juppe, who led in most opinion polls before the vote, positioned himself as the anti-Sarkozy. He called for tolerance and multiculturalism, and for a firm stance against the far right, even contemplating a government of national unity with some of the Socialists.

Francois Fillon stood somewhere between the other two. Like Juppe he was a moderate on cultural issues and strongly opposed to the National Front, but he was more conservative on social issues (important for the Republicans’ mostly Catholic rank and file) and advocated more radical free-market policies. He was also personally distant from Sarkozy, despite (or perhaps because of) having served him for five years as prime minister.

Until last week, Fillon seemed to be running a distant third, but the last few opinion polls showed him making dramatic gains. And so it was: with about 90% of the vote counted, Fillon has a commanding lead on 44.2% to Juppe 28.4% and Sarkozy 20.7%. The other four candidates barely troubled the scorers, none of them managing more than 3% (Le Monde has live results here)

Sarkozy has conceded defeat, announced his retirement from politics, and given his support to Fillon in the second round. Unless something dramatic happens in the next week, that now looks a mere formality; although Juppe promised to continue the fight, Fillon will be almost impossible to beat.

So France’s centre-right voters, faced with an unprecedented challenge, have opted to maximise party unity and firmly rejected the option of conceding policy ground to the far right in advance.

Not only will that make for a sharper choice next year, it will also improve Fillon’s chances of rallying the democratic forces behind him.

There were persistent doubts that Socialist voters, given a choice between Sarkozy and Le Pen, would bother to turn out at all.

A stark choice, however, also poses risks. Le Pen could hardly have a better foil than Fillon for her message of protectionism and anti-globalisation. It will be a test of the Trumpian thesis that economic discontent is driving a shift to the right; if French voters want to retreat to the past, they will have a clear opportunity to say so.

But the high turnout (around 4 million) as well as the result suggest that centre-right voters — unlike their counterparts in some other places — have not given up on the idea of optimism and progress. And that’s a message the world desperately needs to hear.