A hard-right politician, written off by pollsters and establishment pundits for month, rockets to the top of the polls in his party's presidential primary. He vows to “conquer Islamic totalitarianism,” promises to clamp down on mass immigration, and calls for a closer relationship with Vladimir Putin’s Russia. When the vote is finally held, he trounces his establishment rivals, setting him up for a once-inconceivable general election victory.

No, he’s not Donald Trump: He’s François Fillon, the man who won a vote Sunday to lead France’s center-right Republican Party in the 2017 presidential election. Fillon, seen as an irrelevant long shot when he announced his candidacy in April 2015, beat the more centrist Alain Juppé by a wild 33-point margin.

Fillon’s landslide win sets up a showdown with Marine Le Pen, leader of the far-right, xenophobic Front National (FN) party. On key issues like immigration, it isn’t much of a choice: Fillon has basically aped her xenophobic agenda.

“There’s not that much difference between Le Pen and Fillon on Islam, security, [immigration], and foreign policy,” Art Goldhammer, a senior affiliate at Harvard’s Center for European Studies, tells me.

It also makes France the third major power, after Britain and the United States, to experience a shock election result fueled in major part by grievances over culture and ethnoracial identity. Fillon’s campaign stole themes that had been developed by Le Pen’s far-right, anti-immigrant FN, and married them to a kind of anti-government and socially conservative sentiment that proved surprisingly widespread among the French middle class.

Now, anything could happen in 2017, but Fillon is the favorite: Almost all polls show the Republicans leading both the FN and the center-left Socialists. His victory would augur major changes for France: a historic slashing of its generous welfare state, a crackdown on immigration, restrictions on gay couples’ rights as parents, and tension between France and its NATO allies as the nation cozies up to Putin’s Russia on issues like Ukraine and Syria.

Fillon’s victory, in other words, represents the mainstreaming of a far-right platform in yet another of the world’s nuclear powers.

Who is François Fillon, and what does he want?

Despite the similarities between elements of Fillon and Trump’s messages, the two men could not be more different in terms of background and temperament.

Fillon grew up in the northwestern city of Le Mans, in an upper-middle-class Catholic family — his father was a bureaucrat and his mother a history professor. He has been in politics for practically his entire adult life, winning a seat in France’s parliament in 1981, when he was a mere 27 years old. (He was, at the time, the youngest member of the National Assembly, France’s lower legislature.)

When he took office, Fillon was a member of Rally for the Republic (RPR) — a now-defunct party committed to an ideology pioneered by former French President Charles de Gaulle.

Gaullism, as it’s called, is a kind of nationalism that has dominated the French right in the postwar era. It emphasizes the need for social cohesion, a powerful central government, and a strong, independent foreign policy — making it skeptical of both the European Union and the United States’ role in continental affairs.

Fillon’s particular brand of Gaullism, called “social Gaullism,” focused on the threat to French sovereignty from European integration. It also emphasized the need for the government to care for the excluded in order to maintain the overall health of the nation. That meant a relatively interventionist economic policy aimed at, among other things, providing jobs for the jobless and homes for the homeless. Fillon’s sincerely held Catholicism added another element to this — in 1982, he voted against a bill that would decriminalize same-sex relations.

These ideas, as the BBC’s Hugh Schofield documents, dominated Fillon’s long career in top-level politics. He served in the cabinet five times, and as prime minister from 2007 to 2012. (In the French system, the prime minister generally plays second fiddle, helping to implement priorities set by the president.) His premiership was not successful, with few legislative accomplishments he can take credit for. According to the New York Times, then-President Nicolas Sarkozy would make fun of Fillon behind his back.

After leaving the premiership, Fillon took a hard turn to the right. It’s not exactly clear what changed his mind — whether it was a need to reinvent himself after a failed stint as prime minister or an actual change of heart.

Regardless, Fillon became one of the premier critics of the French welfare state, arguing for a need to slash 500,000 civil service jobs and cut spending by $116 billion in five years. He criticized France’s famous 35-hour workweek, arguing that French workers were too reliant on the government, and argued for tax cuts to relieve the burden on the middle class.

This is a wholesale rejection of France’s postwar model — a kind of hard-right turn akin to what Ronald Reagan and Margaret Thatcher promised their respective countries in the 1980s. Both the French and British press frequently compare Fillon to Thatcher.

Post-government Fillon also took a hard line against multiculturalism. He wrote a book called Conquering Islamic Totalitarianism, and said France needed to work with Putin to defeat ISIS in Syria. He supported the movement to ban “burkinis,” swimwear marketed to Muslim women who want to cover up at the beach. He promises to impose quotas on immigration that vary by region of the world and write immigration restrictionism into France’s constitution.

This put him basically in the same place as FN leader Le Pen, whose political identity and appeal centers on hard-line opposition to immigration and multiculturalism.

Fillon’s social conservatism extends beyond these issues, going back to his Catholic roots. Fillon expresses personal opposition to abortion and same-sex marriage, though he has said he will not attempt to reverse French law in either area (both are legal). He does want to scale back gay couples’ rights, proposing a new legal definition of “parenthood” that would prevent same-sex parents from officially adopting children.

Finally, he has proposed a fairly drastic revision to French foreign policy. He is an actual personal friend of Vladimir Putin; the two have, among other things, played billiards together. Unsurprisingly, his foreign policy is astonishingly pro-Russia, and not just on issues related to terrorism. He has called on the West to accommodate Putin’s interventionism in Ukraine, and blamed “American imperialism” for Europe’s problems.

“Putin has praised Fillon’s leadership, from the time he was prime minister,” Goldhammer explains. “Every sign is that Fillon will be as close to Putin, if not closer, than Trump promises to be.”

Fillon, then, has put together a set of policies that push the boundary of France’s political discourse in every area. He’s essentially doubled down on social Gaullism’s nationalism and jettisoned its left-wing economics in favor of a conservatism more recognizable to American audiences. By French standards, he’s a radical — a stance covered up by his establishmentarian past and relatively quiet manner.

Why Fillon won the primary — and why he’s favored in the general

For most of the election, very few people gave Fillon a chance. Juppé, the widely popular moderate, and former Fillon frenemy Sarkozy were the favorites in the primary, with polls between them narrowing as the campaign went on.

But in early November, polls started to show a surge in support for Fillon. On November 20, the Republicans held a first round of voting — and Fillon and Juppé were the top vote-getters, eliminating Sarkozy from contention. Sunday’s vote was a runoff between the two finalists, and Fillon ran away with it.

According to Goldhammer, Fillon did three main things right.

First, he stole far-right themes about the threat from Muslim immigration, picking up on widespread discontent among right-wing voters with mass immigration from Muslim countries. This sentiment is powerful enough to essentially singlehandedly fuel the rise of the FN, so tapping into it was a smart play for a conservative candidate.

Second, his anti-LGBTQ history and anti-abortion stance made him into the candidate of France’s vocal minority of Catholic conservatives. The kind of people who participated in the mass protests against same-sex marriage in 2013, a response to President François Hollande’s successful bid to legalize it, were the kind of people likely to vote for Fillon.

Third, and perhaps most surprising, he identified a level of hostility to the French welfare state among the middle class that very few analysts had picked up on.

His promise to cut civil service jobs “was an appeal to the provincial bourgeoisie, which turned out very heavily for him,” Goldhammer says. “Since nobody saw it coming, it’s only in retrospect that I can give you this argument ... but it seems that within a fairly substantial segment of the French right, the idea that the French state is extraordinarily bloated and needs to be cut down in size has gained increasingly in popularity.”

This combination made Fillon uniquely positioned to beat his primary opponents. Juppé’s economic platform was essentially Fillon-light, but Juppé failed to embrace Fillon’s cultural conservatism in the same manner. Sarkozy leaned perhaps even more heavily into anti-Muslim politics than Fillon did, but didn’t promise to cut the size of government as dramatically. Only Fillon’s complete conservatism captured the mood of the Republican electorate.

And now that Fillon has won the Republican primary, it’s not clear who can stop him.

The French left is in shambles. Socialist President Hollande’s approval rating is hovering around 4 percent, but he has yet to rule out running for another term. His prime minister, Manuel Valls, is more popular, but he’s facing a challenge from Emmanuel Macron, a charismatic center-leftist and former economy minister who’s running as an independent. Polls suggest that the Socialist candidate, Macron, and another centrist (François Bayrou) split the center and left votes, weakening all of them.

It’s possible this won’t happen, and the left will reassert itself in the face of Fillon’s hard-line conservatism and Le Pen’s xenophobia. But the most likely result of 2017’s first round of voting is a runoff vote between the two rightists, with the Gaullist battling it out against the upstart xenophobe.

Current polling shows a massive Fillon lead over Le Pen in a head-to-head contest, roughly on par with the amount by which he beat Juppé. The most likely outcome is that he maintains a lead, owing to the FN’s toxic reputation with mainstream voters.

But his win is by no means inevitable.

“Whether Fillon wins [in a head to head] becomes an even-money proposition, regardless of the poll that came out today that shows him winning two to one against Le Pen,” Goldhammer says. “I don’t think that’s going to last.”

Economics are the key dividing issue. Le Pen embraces an approach that scholars call “welfare chauvinism,” a defense of the French welfare state as something only French people should enjoy. This means dramatically slashing immigration but also preserving the key institutions of the French welfare state (like high levels of state employment).

Right now, the anti–Le Pen sentiment depends on the perception that she’s an anti-immigrant extremist and borderline racist. This, Goldhammer suggests, can only last so long as centrist and left-wing voters avoid taking a hard look at Fillon’s platform.

Once people fully understand that there isn’t much difference between him and Le Pen on immigration and multiculturalism, they may well choose to vote for her to save the welfare state.

“He’s going to need votes from the left and the center,” Goldhammer says. “If he sticks with his hard-right platform ... I don’t see what the attraction is there.”

Fillon’s victory, then, makes a veer to the right in France very likely. It’s just not clear which version of hard right politics will win out.