WHEN MAURICIO MACRI was elected president of Argentina in 2015, one of his first acts was to abolish capital controls that restricted buying and selling of the peso. The move symbolised Argentina’s pivot back to open markets and liberal economic reforms under his rule. On September 1st, after weeks of market turmoil, Mr Macri was forced to issue a decree reimposing controls in an attempt to shore up the currency. From now on ordinary Argentines’ purchases of dollars will be capped at $10,000 a month. Companies will face restrictions on their ability to purchase dollars in the foreign-exchange market and to pay dividends to investors abroad.

Investors are habituated to financial fiascos in Argentina but even so the news has come as a rude shock: the price of Argentina’s sovereign bonds traded in Europe tumbled by about 5% the day after the announcement. It has been a torrid winter. The country flirted with default on August 30th, when it said it would try to extend the maturity of some of its external debts. Its foreign-currency sovereign bonds now trade at only about a third of their face value. The crisis probably spells the end of Mr Macri’s time in office, is a humiliation for the IMF and a disaster for the country. Yet again Argentina finds itself a financial outcast.

Mr Macri inherited an economy in disarray but initially won the confidence of Wall Street. He began his tenure not only by floating the peso but by giving the central bank a target to tame inflation (which was measured honestly again after years of book-cooking), dismantling controls on the prices of hundreds of goods, from soap to chicken, and reaching a deal with holders of defaulted debt. Foreign financial firms lapped it up. In 2016 Jamie Dimon, the boss of JPMorgan Chase, America’s biggest bank, told its shareholders that “Argentina can be an example to the world of what can happen when a country has a good leader who adopts good policy.” Incredibly, in hindsight, Argentina managed to flog a 100-year dollar bond at an interest rate of only 8% in June 2017. (It has since lost over 60% of its value.)

Things went downhill soon after. Mr Macri was wary of stifling economic growth and, lacking a majority in congress, was reluctant to cut the budget deficit sharply. He relaxed the central bank’s inflation target, despite racing prices. Investors cooled, in part because global interest rates began to rise, drawing capital from emerging economies back to America. In early 2018 the peso slid rapidly, losing a fifth of its value against the dollar in just over four months. Mr Macri was forced to turn to the IMF, which agreed to lend Argentina $50bn, later extended to $57bn, its largest-ever programme.

Then on August 11th Mr Macri was resoundingly defeated by Alberto Fernández, his populist opponent in the presidential election in October, in a primary poll that acts as a dress rehearsal for that election. Mr Fernández’s running mate is Mr Macri’s predecessor, Cristina Fernández de Kirchner (no relation). Formally, the primary settled nothing. But Mr Macri’s goose looks well and truly cooked. Investors rushed to dump Argentine assets, fearing that Mr Fernández will return to the reckless policies pursued by Ms Fernández (under whom inflation soared so high that the government fiddled the data). The Merval stock market index lost 37% the day after Mr Macri’s drubbing. The peso plunged by 25%.

The currency then slid again last week after an old ghost reappeared: a default on Argentina’s foreign debt, which has happened eight times since independence in 1816. The government announced a “reprofiling”—ie, delayed repayment—of $100bn-worth of short-term borrowings and raised the prospect that some longer-term debts might be rejigged, too. That led to a new wave of capital flight and a few days later the reimposition of currency controls.

Argentines have bitter memories of the previous time their government went to the IMF, in 2001, blaming it for the austerity and devastating sovereign default that ensued. Mr Fernández has played on the fund’s unpopularity, accusing it of being responsible for Argentina’s latest troubles and promising to renegotiate the loan. That may work out nicely for him: fear of his presidency helped bring about the peso’s crash, which in turn makes his eventual victory more likely. But if he wins it will be a poisoned chalice: a country facing default again, cut off from international markets, and a population even more beleaguered and cynical about reform.