THREE years ago, he was largely unknown to the public. Today he is a step away from becoming France’s president. Emmanuel Macron’s remarkable rise from obscurity to favourite for the presidential election on May 7th carries symbolic value well beyond his homeland. If he defeats Marine Le Pen of the National Front (FN), as polls suggest he will, the country will have shown the rest of the world not only that it can favour youth over seniority, and optimism over fear, but that pro-European liberalism can still triumph over populism and nationalism.

A former Socialist economy minister and one-time investment banker, the 39-year-old Mr Macron topped first-round voting on April 23rd with 24%. Ms Le Pen came a close second, with 21%. The pair, neither of whom comes from an established mainstream party, knocked out candidates from both of the two political groupings that have held the French presidency for the past 60 years. François Fillon, a former prime minister who ran for the Gaullist Republican party, came third on 20%. Benoît Hamon, the Socialists’ candidate and a former backbench rebel, sank to a dismal fifth place, on 6%. Despite a late surge, the Communist-backed Jean-Luc Mélenchon was narrowly held to fourth place, on 19.6%.

Mr Macron’s achievement defied all the rules. His tone on results night looked prematurely victorious. But those who joined him when he set up his political movement, En Marche!, a year ago appeared almost stunned this week. For months, his campaign has been low-cost, and sometimes chaotic. His headquarters, filled with young people in sweatshirts and take-away food boxes, has felt more like a startup than a slick political machine. Nevertheless, in the end he secured nearly as many votes as the Socialists and Republicans put together.

Yet Mr Macron’s score was also the lowest for a leading first-round candidate since 2002. The results revealed a deeply fractured country. Mr Macron won over voters in thriving big cities, where warehouses have been converted into tech hubs and cars are viewed as a menace. He came top in Paris (with 35%, against 5% for Ms Le Pen), Rennes (32% to 7%), Bordeaux (31% to 7%) and Lyon (30% to 9%). His support was evenly spread across all age groups. It correlated with greater income, optimism and education (see chart). This is the France that feels at ease with Mr Macron, a zealous pro-European who wants to reinforce ties with Germany, keep France part of the global trading system, support the transatlantic alliance and build cross-party support between left and right to “unblock” the economy. By contrast, nearly half of all voters backed one of the anti-system candidates: Ms Le Pen, Mr Mélenchon or one of several mostly far-left contenders. Ms Le Pen topped voting in both the FN’s southern strongholds and a broad swathe of the French rust belt, in the north and east, as well as in rural and semi-rural areas that have lost jobs, shops and services. Her support encircles big cities, often in villages and suburbs as yet untouched by immigration. Ms Le Pen lost her hold on the under-25-year-olds, who preferred Mr Mélenchon, but remains the favourite candidate for working-class voters, capturing 37% of their support, next to 16% for Mr Macron. This is the France des oubliés (“of the forgotten”), as Ms Le Pen puts it. Campaigning under the slogan “In the name of the people”, she vows to hold a referendum on taking France out of the European Union, and thus the euro. She wants to introduce protectionist trade barriers, tax firms that hire foreigners, strengthen ties with Vladimir Putin’s Russia, close the borders to immigration and strip jihadist suspects with dual citizenship of their French nationality. In many ways, Mr Macron is her ideal opponent. She calls him a “globalist”, a rootless citizen, the candidate of banks and finance and “the system”, supported by the beau monde of Paris. Early polling suggests that Mr Macron will beat Ms Le Pen by about 60% to 40%, as voters come together to keep the FN out. Mr Fillon and Mr Hamon both said that they will vote for Mr Macron to defeat Ms Le Pen. So did Nicolas Sarkozy, a Republican ex-president; Alain Juppé, a Republican ex-prime minister; and François Hollande, the Socialist president—though Mr Mélenchon left his intentions ambiguous. Yet the polling gap is likely to narrow. This week, Ms Le Pen stepped aside temporarily as head of the FN to try to reach out beyond her party base. Nearly a third of Mr Fillon’s voters and 9% of Mr Mélenchon’s say they will back her. On the far left, Mr Macron is considered toxic. The choice, claim some, is between a banker and a fascist. An anti-Macron campaign, in favour of abstention, was circulating this week on social media, under the hashtag #SansMoiLe7Mai (“without me on May 7th”).

To bridge such divides, Mr Macron needs to find a way of speaking to those who do not share his optimism about the benign nature of globalisation. His manifesto contains strong ideas on reforming lifelong learning and retraining, for example, and on shrinking class sizes in weak schools. But such promises will not bring back jobs and factories in the short run. Mr Macron also argues that technological innovation—including “gig economy” firms such as Uber—can reduce ethnic discrimination in the banlieues. The most common business registered in 2015-16 in such areas north of Paris was taxi-driving. But many voters fear robots will put them out of a job. At a campaign stop this week in his home town of Amiens, in northern France, Mr Macron was greeted with jeering and whistling by factory workers angry at its threatened closure. “Macron is just the continuation of Hollande,” said one, who said he would vote for Ms Le Pen.

The election could presage a break-up of the old party system. “You reap what you sow,” said Manuel Valls, a Socialist former prime minister, who rejected his own party’s candidate as too left-wing. One estimate suggests that the Socialists could lose 75% of their seats at legislative elections in June. He and fellow Socialist moderates have to decide whether to try to claim back the party’s leadership, or to campaign for En Marche!. Mr Macron, who thinks he can get a majority, promises to put up candidates in each of France’s 577 constituencies, half of them political novices. But this involves complex calculations. Will Mr Valls, for instance, really stand as an En Marche! candidate? If not, will En Marche! really field a candidate against him?

On the centre-right, there is consternation, too. After five years of Socialist government, many conservatives thought this election theirs by right. En Marche! claims some are ready to defect to Mr Macron. But many still hope that they can score well at the parliamentary vote before negotiating with him. Bruno Le Maire, a Republican former Europe minister, said he would be prepared to work in a Macron government if no party secured a majority. Others are hostile. Laurent Wauquiez, a regional Republican president, ruled out backing Mr Macron, arguing that he did not “want the FN to be the only opposition in France”.

As the two candidates enter the final lap, each can reasonably claim a part in changing the face of French politics. Ms Le Pen secured 7.7m votes, 1.3m more than at the first round in 2012, and a big jump from the 4.8m her father got in 2002. When he made it into the run-off, he scored only 18%. That she might well more than double that on May 7th is a reflection of her success in turning the FN into a fixed feature of the French party system. Even if she loses, Ms Le Pen has had an outsized influence over this campaign.

As for Mr Macron, he has already pulled off a historic feat. Last summer, he was a rank outsider, whose hopes of running defied all French rules about the way presidential candidacies are slow-cooked over the years. Now, the man with a dream, a gamble and a heavy dose of luck appears well placed to become the youngest-ever president of France’s Fifth Republic. After that, the hard part begins.