PARIS — Marine Le Pen hadn’t counted on this.

For months, a wave of populist nationalism has swept across the West, humiliating pundits, discrediting pollsters, and surprising even some of the voters who pulled the European ejection cord in Britain and pumped Donald Trump into the presidency of the United States.

It has looked like Le Pen could count on that trend to get a very serious shot at the French presidency in May, and she still might. But there are also signs that in France, at least, there is a new yearning for more mainstream personalities. And the spectacle of Trump’s incoming administration in the United States may actually serve to undermine the European version of the alt-right rather than support it.

In the streets of Paris these days, one often hears the question: “How can such a man as Trump be president of the United States?” People are genuinely baffled by his buffoonery. In France, traditionally, they prefer their presidents to be sérieux.

On Sunday night, as votes were counted in the first ever presidential primary held by the French political party that now calls itself Les Républicains, that sort of serious mainstream conservatism made a stunning comeback.

The top two finishers, both of them former prime ministers, were François Fillon and Alain Juppé. Former President Nicolas Sarkozy, who had tried to appear more right-wing even than Le Pen, came in a humiliating third, ineligible for the runoff next Sunday.

Hence the surprise: Le Pen, as leader of the far-right-wing National Front, has seen the whole French political establishment swerving in her direction in recent years, using rhetoric and advocating policies hostile to immigrants and, increasingly, skeptical of the European Union. And she and her supporters were confident that nobody could out-Le Pen her.

The National Front election strategy had been quite clear. It is assumed that President François Hollande, a Socialist whose approval ratings now hover in the range of 4 percent (yes, four percent), has no prayer of winning if he runs, and any other Socialists will be so tainted by his aura of impotence and failure that they will have no chance either.

So the likely scenario is a two-round election next spring in which the Socialists are knocked out early, Le Pen will win a plurality, and then she will face the nominee of Les Républicains in the runoff.

Sarkozy was an easy mark, since his hyperkinetic manner and many unkept promises when he was in office are a serious electoral liability. In 2012, Hollande won largely because so many voters cast their ballots against Sarkozy. Now, the voters in Sarkozy’s own party primary have knocked him out of the race for good and opted instead for the man who served as his prime ministerial understudy from 2007 to 2012: François Fillon.

Le Pen also reportedly figures she has a good chance against Juppé, who was President Jacques Chirac’s prime minister in the 1990s, if he manages to win the presidential nomination next weekend. Juppé is 71, distinguished, and very s érieux, a classic French presidential figure. But while he may inspire confidence in some voters, he does not inspire much passion. And Fillon, who had languished in third place in the polls for the last several months, came from behind to crush Juppé as well as Sarkozy.

The numbers were 44.1 percent for Fillon; 28.6 percent for Juppé; and 20.6 percent for Sarkozy, with four other candidates picking up the crumbs.

The next few days will see Fillon and Juppé focused on explaining the differences in their policies, and voters who picked Fillon as the handsome, controlled alternative to the ever-twitchy Sarkozy may look more closely at his platform than they did previously.

He is a mainstream statesman, but also very conservative by French standards, advocating some policies modeled on those of Britain’s Margaret Thatcher. Fillon has promised, for instance, to eliminate 500,000 public sector jobs, whereas Juppé talks about cutting 200,000 to 300,000. And Le Pen’s National Front is much less radical — much less austere — in its domestic economic policies.

Fillon identified strongly with the Catholic right wing in France, and opposes the current law allowing adoption by gay couples. Juppé would let the present law stand.

Juppé is skeptical about the intentions and actions of the Russian and Iranian leaders, while Fillon, like Trump—and like Le Pen—advocates closer ties and cooperation with Moscow, especially when it comes to fighting terrorists in Syria and around the world. Unlike Trump, Fillon recognizes that such a policy would have to embrace Iran as well.

On the question of radical Islam, Fillon sounds much like Le Pen and Trump. To promote his recent book, Defeating Islamic Totalitarianism, he writes. “Let’s forget what’s politically correct. It is time to call a cat a cat and totalitarianism totalitarianism. Yes, the bloody invasion of Islamism in our daily lives prepares the way for a Third World War. Yes, the real question today is how we can overcome the terrible threat that has plagued France and the French. Enough contortions, enough demagoguery!”

Did we say Fillon is a moderate? Not exactly. Just more of a mainstream statesman and more moderate than Le Pen and Sarkozy, and, now, more likely than anyone else to be the next president of France.