HE LEFT university six years ago. He became Austria’s foreign minister four years ago. Now Sebastian Kurz is on the verge of becoming the country’s chancellor, and at 31 the youngest leader of government in the world. Following today’s general election in the Alpine republic his centre-right Austrian People’s Party (ÖVP) is on 31.7% in the latest projections, up 7.7 points. The Austrian Social Democratic Party (SPÖ), which currently leads a “grand coalition” of the two parties, is flat on 26.9% and the far-right Austrian Freedom Party (FPÖ) is up 5.5 points to 26.0%.

As the leader of the largest party, Mr Kurz (aka the “Wunderwuzzi” or whizz kid) will have the first shot at forming a government. Another grand coalition is unlikely. Relations between the ÖVP and SPÖ were terrible. Then came the election campaign, in which they deteriorated further as each accused the other of dirty tricks (the SPÖ’s campaign guru allegedly set up racist Facebook pages attacking Mr Kurz, for example). That leaves an ÖVP-FPÖ government, now the most likely outcome. From 2000 to 2007 Austria was led by such a coalition, when Wolfgang Schüssel of the ÖVP did a deal with Jörg Haider’s FPÖ. It was not a great success: starting with international opprobrium and ending with corruption scandals and baroque infighting. Yet today there is a natural alignment between the two parties.

Heinz-Christian Strache, who took over the FPÖ after it left government, is impatient to wield power and running out of time. He wants to be vice-chancellor. He has softened the party’s image and professionalised it. Meanwhile Mr Kurz is unequivocally right-wing on immigration. As foreign minister he became Austria’s most popular politician by demanding that the “Balkan route” (by which immigrants were travelling from Greece to Austria and beyond) be closed and as integration minister (a job which he has held simultaneously) imposed a popular burqa ban. In the election campaign he has offered an uncompromising message to newcomers: welfare entitlements are to be cut to push them into work; those not striving to integrate will be penalised.

Yet Mr Kurz has also succeeded by melding this severe message with sunnier promises of social and economic renewal. Since taking over his party in the summer he has opened it up, bringing in non-political figures, rebranding the stuffy old ÖVP as the “Sebastian Kurz List” and switching its colour from black to turquoise. He pledges economic renewal, greater transparency, and (badly needed in perhaps Western Europe’s most corporatist economy) a leaner and less clientelistic state. His political praetorian guards are the relatively socially liberal Vienna cadres of the JVP, the ÖVP’s youth wing, which he used to run.

Now the really hard work begins. Mr Kurz faces three main obstacles. The first is Christian Kern, the chancellor. His SPÖ did better than expected, thanks partly to the collapse in the Green vote (the party recently split, with the former leader Peter Pilz leading a new, rival force to a better result). Though flat nationally—no mean feat given that they have run Austria since 2007—the Social Democrats made gains in cities like Vienna and Graz. That seems to have stiffened Mr Kern’s nerve after a terrible campaign. Tonight he has spoken of being ready to take on new “responsibility”. Some in Vienna reckon he might try to outbid Mr Kurz and form an SPÖ-FPÖ government. This remains unlikely, but it is a hurdle the “Wunderwuzzi” must clear.

The second obstacle is the FPÖ itself. Last time it was in government the far-right party allowed itself to be manipulated by the crafty Mr Schüssel. Mr Strache—the most experienced figure in frontline Austrian politics, who has run a slick and professional election campaign—will make a more formidable partner than Haider. He will probably win the interior and justice ministries in coalition talks. A major battleground will be the extent of FPÖ influence on Austrian foreign policy. I understand Mr Kurz, already looking ahead to Austria’s presidency of the EU next year, intends to stand his ground on this. But Norbert Hofer—the FPÖ grandee who almost became Austrian president last year—is determined to become foreign minister. The outcome of this struggle will decide how much the new right-wing government tilts Austria eastwards in Europe; away from Germany and towards reactionary Visegrád governments like those of Poland and Hungary. Angela Merkel may get a new headache.

Negotiating, then running, a coalition with the FPÖ will be tough for a relatively inexperienced chancellor. Looking ahead to an ÖVP-FPÖ government Josef Lentsch, a liberal think-tanker, compares Mr Kurz to David Cameron and the FPÖ to the eurosceptic Tory backbenchers. In other words, he will be under relentless pressure to go farther to the right.

The third, final and perhaps highest obstacle will be Mr Kurz’s own party—and the intransigent Austrian establishment that it epitomises. Since 1945 the country’s peace has been kept by a system divvying up public life—state companies, public services, subsidies, regulatory responsibilities—between political parties (Proporz, the system is called). Mr Kurz considers this unsustainable, and with reason: Austrian unemployment, once half that of Germany, is now around 50% higher. But he leads a party tightly woven into the associational web that he wants to start unpicking. If he really wants to improve school standards, say, or scale back subsidies paid to favoured businesses, or open up the labour market, he will have to do battle with the Bünde, the mighty interest groups within the ÖVP, and with his party’s powerful state governors.

How will Mr Kurz manage? I met him in Vienna in May, early on the morning after the Manchester bomb attack. He had just chaired an OECD summit on terrorism. My impression was of a leader with maturity well beyond his years, who disarms people by being polite to the point of courtliness (not a rare trait in Vienna, his home city). But I would be lying if I claimed to know how much real gravitas he has. To his fans he is a new kind of leader—deftly embracing the popular mood on “difficult” subjects but using the ensuing power to transform the country. To his opponents he is an opportunist who has swallowed the FPÖ’s right-wing policies and lacks the muscle to stand his ground. Now to find out who is right.