IT WAS an announcement Mauricio Macri hoped never to have to make. On May 8th Argentina’s exhausted-looking president declared that Argentina was seeking a credit line from the IMF. He had little alternative. Efforts to prop up the peso, which has lost a fifth of its value against the dollar since the start of the year, had failed. Between April 23rd and May 4th the central bank hiked interest rates by 12.75 percentage points to 40% and sold $5bn of its currency reserves. The finance ministry announced it would shift this year’s deficit target from 3.2% to 2.7% of GDP. Neither was able to arrest the peso’s slide. World leaders have previously praised Mr Macri for his efforts to rehabilitate Argentina’s economy. What went wrong?

Mr Macri’s predecessor, Cristina Fernández de Kirchner, bequeathed an economy close to collapse. A dispute with holders of its defaulted debt shut off Argentina from international credit markets. The national statistics institute fiddled its figures to conceal inflation of more than 40%. Farmers hoarded grain to dodge export taxes. Generous subsidies on public transport and utilities pushed the budget deficit to 5.4% in 2015. After taking office in December that year Mr Macri wasted little time in reaching an agreement with bondholders, cutting export taxes and lifting currency controls. But the fragility of Argentina’s economy meant a more gradual approach was needed to reduce the deficit. Luck was initially on Mr Macri’s side. Low international interest rates enabled him to plug the shortfall cheaply. In June 2017 Argentina even sold a 100-year bond.

Markets now seem to have lost their appetite for Argentine risk. Unease over the government’s management of the economy grew in December after it pressed the central bank to ease this year’s inflation target from 12% to 15%. That cast doubt on the bank’s independence. Then on April 24th American ten-year Treasury bond yields reached 3% for the first time in four years, prompting investors to pull out of emerging markets and other risky assets. Turkey, Russia and Mexico all suffered sharp falls in the value of their currencies. But Argentina was hit particularly badly. Investors took fright at the country’s wide fiscal and current-account deficits, its 25% inflation and its rapidly expanding pile of foreign-currency debt.

Until recently Mr Macri had enjoyed decent approval ratings. In October his coalition performed impressively in mid-term elections, winning more than 40% of the vote. But the decision to begin negotiations with the IMF is unlikely to win him much popular support. Many Argentines blame the IMF for pulling the plug on loans before the country’s devastating default in 2001, a national trauma which led to sharp increases in poverty and unemployment. A recent survey found that three-quarters of Argentines remain opposed to IMF assistance. Mr Macri will hope that a dramatic improvement in the economy will win them over in time for presidential elections in October 2019. His fortunes, and those of Argentina, are at stake.

Dig deeper: “Will Argentina’s woes spread?”; “The crisis of Macrinomics”

Correction (June 8th, 2018): This piece previously stated that the finance ministry would shift its deficit target from 3.4% to 2.7% of GDP this year. The original deficit target was actually 3.2%, not 3.4%. Sorry.