The fallout in Europe from the election of Donald Trump is perhaps nowhere as stark as in France. A country that has the largest far-right party on the continent is fast heading towards key elections. Marine Le Pen, leader of the Front National, has felt elated by the US vote, just as she was by the Brexit referendum. On 9 November she applauded “not the end of the world but the end of a world”. She hopes to replicate in France what Trump has achieved in the US. Whether Ms Le Pen can attain her goal is by no means a certainty. In France’s two-stage electoral system, to win the presidency a candidate needs to come top or second in the first round of voting and then win the run-off between both finalists. Ms Le Pen is all but guaranteed to pass the first hurdle, with polls putting her support at around 30%, but will struggle in the second. But Ms Le Pen in the Elysée Palace is no longer a far-fetched idea. France stands at a dangerous crossroads. Who her opponent might be becomes a matter of not just European, but global import.

The chances of the left are dismal. It is increasingly divided and the Socialist president, François Hollande, has approval ratings of just 4%. The announcement this week that Emmanuel Macron, his former economics minister, will run for the presidency has added another blow. Macron’s youthful “moderniser” image carries some appeal, but he lacks the backing of a party structure and his programme is as yet unknown. So the main contest is being waged within France’s mainstream right, which will start holding its primaries on Sunday. If none of the seven candidates reaches 50% in this first round – which is likely – a run-off between two finalists will be held on 27 November. The main contenders are the former prime minister Alain Juppé and the former president Nicolas Sarkozy. Another name, recently gaining ground, is François Fillon, a former prime minister under Mr Sarkozy for five years and a firm conservative. This cast of politicians, whose careers stretch over decades, speaks little of democratic renewal. Yet the contrasts between them are significant.

Mr Sarkozy has opted to echo some of Ms Le Pen’s xenophobic themes, especially on Islam and immigration. Mr Juppé has chosen, by contrast, to combat them, convinced that pandering to FN voters will only galvanise Ms Le Pen, not counter her. He believes a message of moderation and inclusiveness is what the country needs, at a time of crisis and trauma resulting from terrorist attacks and rising social ills. He also wants to shake up economics, wanting to loosen up the labour market to tackle unemployment. Mr Sarkozy hopes a Trump-type contagion in France can benefit him – but Mr Juppé has the edge in polls.

France’s swing to the right is manifest and tinged with Trumpism. Identity politics have come to dominate public discourse; the country is polarised. The middle classes are deeply disgruntled and many young people feel deprived of opportunities. With anxieties over globalisation rife, France needs to restore a sense of confidence. Its welfare system has moderated inequalities after the crash and there is a vivid start-up scene. Yet perceptions – fuelled by high unemployment, the impact of terrorism and a loss of international clout – are of a country in crisis. This opens doors for those who seek to inflame populist passions and designate scapegoats. Neither France nor Europe could afford a Le Pen presidency: it would be a severe threat to democracy in a country where the concentration of presidential powers is the strongest in the western world, and it would likely spell the end of the EU project. As things stand, Mr Juppé offers the best chance of defeating the far-right in 2017. His calm demeanour and openness to diversity have the potential to rally leftwing voters in the presidential run-off. Mr Sarkozy does not. After the election of Donald Trump shook the foundations of western liberal democracy, the stakes couldn’t be higher.