CAR horns blared. Firecrackers lit up the sky. Yells of “Vamos!” rang out among Buenos Aires’s Parisian-style apartment buildings. The revellers were acting like football fans, but the win they were cheering on November 22nd was political. It was the upset victory of Mauricio Macri, the mayor of the city of Buenos Aires, in a run-off election to become Argentina’s next president. Even more than most presidential transitions, Mr Macri’s triumph will begin a new era for the country, and perhaps for South America as a whole.

He takes over from Cristina Fernández de Kirchner, who together with her late husband, Néstor Kirchner, governed for 12 years with a defiant populism that distorted the economy, made enemies at home and abroad and undermined institutions. Ms Fernández leaves her successor with an economy that has barely grown for four years, dwindling foreign-exchange reserves, inflation of around 25% and a budget deficit of more than 6% of GDP.

Mr Macri’s defeated rival, Daniel Scioli, shared Ms Fernández’s Peronist pedigree and ran as her heir. But even he would have reversed many of her policies; the parlous state of the economy would have left him with little choice. With Mr Macri, the first elected president in nearly a century who is neither a Peronist nor affiliated with the movement’s weaker rival, the Radical Civic Union, reform is likely to be faster and more profound. He campaigned under the banner of Cambiemos (“Let’s Change”), a coalition of mainly centrist non-Peronist parties. After a dozen years of kirchnerismo, he promises a return to economic sanity, diplomatic prudence and a more accountable democracy.

IN GRAPHICS: The results of Argentina's 2015 presidential election The son of an Italian-born businessman who grew rich on government connections, Mr Macri is an unlikely president, aloof and sometimes almost inarticulate. But he has shown himself to be a good manager and a dogged campaigner. Politically, he is a self-made man. He first came to public notice as a successful president of Boca Juniors, the country’s most popular football club. In a decade he has built a party—Republican Proposal—from scratch.

Technocrats to the rescue

Change will be evident as soon as Mr Macri takes office on December 10th, starting with a new way of governing. He is a more collegial executive than Ms Fernández, although he lacks her charisma. At his post-election press conference—itself a sign of greater openness—he suggested he would move quickly to restore professionalism to institutions that the Kirchners had tried to bring to heel. He will shake up the statistics agency, which has been churning out misleading reports on inflation and none on poverty. He plans to replace the governor of the Central Bank, who has been obediently printing money to finance the budget deficit.

Mr Macri has said that he will disperse power away from Ms Fernandez’s super-ministries of economy and production. He is choosing well-regarded technocrats to fill the top economic jobs. Alfonso Prat-Gay, a former Central Bank governor, is to be the head of a still-weighty finance ministry. Federico Sturzenegger, a congressman and economist, will take charge of the Central Bank. Mr Macri’s choice for education, Esteban Bullrich, commands respect for having reduced the number of teachers’ strikes in Buenos Aires. All the city’s teachers have his mobile-phone number.

To reorient Argentina’s diplomacy, Mr Macri has named Susana Malcorra, a little-known UN official, as foreign minister. The new president wants to repair relations with the United States and European countries, which Ms Fernández snubbed in favour of friendship with authoritarian regimes such as those of Russia, Iran and China. Mercosur, a six-nation trade grouping including Brazil, is likely to be more open to agreements with other trade partners than it has been under the Kirchners. Mr Macri will be a bolder advocate of democracy in South America than his fellow leaders are: he has already said that Venezuela should be suspended from Mercosur if it fails to conduct fair parliamentary elections on December 6th and to release opposition leaders from jail.

His most urgent task is to fix the economy. Ms Fernández kept it limping along by means of “patches”, quick fixes such as a currency swap with China to replenish foreign-exchange reserves. These have been depleted by debt payments and by spending to support an overvalued exchange rate, which gives Argentines an illusion of prosperity but throttles exports. Liquid reserves are probably much lower than the $26 billion the government reports. Last week an oil tanker was left tossing for days off Bahia Blanca because the government could not pay for the cargo. “It’s extraordinary that the economy is on the verge of crisis and people don’t feel it,” says Miguel Kiguel, an economist.

Mr Macri faces three big and interlinked tasks: removing economic distortions, balancing fiscal accounts and restoring normal financial relations with the outside world. The immediate priorities are to boost the Central Bank’s reserves, unify the exchange rate and lift exchange controls. An adviser to the new president says that lifting exchange controls and removing export taxes will encourage farmers to sell crops they have hoarded; this could bring in up to $9 billion to the Central Bank, says Luis Miguel Etchevehere of the Rural Society, a farmers’ lobby (see Bello). Rather than turn to the IMF for support, a political non-starter, the new team will look for other emergency sources of foreign funds. They are expected to try to end Argentina’s isolation from international credit markets by seeking an agreement with bondholders who pushed the country into default last year.

“The challenge is getting the sequencing right,” the adviser admits. Devaluing and freeing the peso without reserves risks an inflationary plunge in its value. But the key to raising reserves is a more realistic exchange rate. In victory Mr Macri was more cautious than as a candidate. Exchange controls will be lifted “once the situation is normalised”, he said.

Raising funds abroad would also give the new government more time to close the fiscal deficit. It will be lumbered with a swollen bureaucracy and indexed spending on benefits which will take time to reform. It can move more quickly to cut energy and transport subsidies which go to rich and poor alike: on average, Argentines pay just $9 a month for electricity. But Argentina has never managed to cut its fiscal deficit by more than one percentage point of GDP per year, notes Luis Secco of Perspectiv@s, a consultancy.

All this will inflict pain in the short-term. Barclays, a bank, expects an economic contraction next year (of 1.1%) before a rebound in 2017. “The big danger is social unrest,” says Mr Kiguel. Mr Macri’s narrow victory means that he will have to build a mandate for radical change. “The first package will have to be more centre-left than centre-right,” says the adviser, acknowledging the political constraints. The Peronists control the Senate; they must be persuaded to repeal laws that prevent a deal with the holdouts.

But the new president has some high cards to play. The Peronist governors, who have influence in the Senate, are a pragmatic bunch; many of them need support from the central government to restructure their debts. Argentina’s isolation from the capital markets means that it is barely indebted. If Mr Macri restores confidence by governing in a transparent and predictable manner, money could emerge from mattresses and flow back home from foreign bank accounts.

He knows it will not be easy. The peroration to his post-election speech at a convention centre on the River Plate was a plea, not a victory cry. “I’m here because you got me here,” he told his cheering supporters. “So I ask you: please don’t abandon me.”