ON JUNE 14th, a day on which the peso fell by 6.1% against the dollar, Federico Sturzenegger tendered his resignation. The president of Argentina’s central bank had little choice. He was the victim of a sustained run on the currency, which has lost more than a quarter of its value against the dollar since the end of April. Its slide had forced the central bank to raise interest rates sharply in April and May, from 27.25% to 40%, and prompted the government to seek assistance from the IMF. A $50bn credit line, announced on June 7th, was supposed to calm investors’ nerves. But the latest plunge and Mr Sturzenegger’s departure show that the turmoil is far from over.

Mr Sturzenegger is not to blame for the run on the peso. Argentina’s problems began in late April after American ten-year Treasury yields rose to 3% for the first time since 2014, prompting a widespread sell-off in emerging markets. But critics accused him of exacerbating the problem by sending confusing signals about monetary policy. After the IMF credit line was agreed, he announced that the central bank would henceforth do less to sustain the peso, intervening in currency markets only in “disruptive situations”. But the bank continued to sell reserves in the peso’s defence, spending $794m between June 12th and 13th. It then held back on June 14th, though the currency continued to slide.

With the currency at a record low—27.7 to the dollar—and investors confused about the central bank’s strategy, Mauricio Macri, Argentina’s president, consulted his economic team. Mr Sturzenegger departed. The president realised that “the market had lost confidence in the central bank,” said Mario Blejer, a former central bank president, in an interview with La Nación, a newspaper. Bold action was required. Luis Caputo, the finance minister and a former banker, was chosen to take his place. Nicolás Dujovne, the treasury minister, took on Mr Caputo’s brief as well, giving him greater control over fiscal policy.

Mr Macri will hope the combined measures restore the markets’ confidence in his government. It will be hard to win back. Of all the emerging markets affected by a stronger dollar, Argentina has suffered most, thanks to its twin fiscal and current-account deficits, high inflation and fast-growing pile of debt denominated in foreign currency.

The agreement with the IMF is designed to avert a crisis of the kind Argentina has suffered in the past. In return for the credit line Mr Macri’s government has agreed to balance its budget by 2020 and record a fiscal surplus of 0.5% of GDP in 2021. It is supposed to achieve this by hiring no civil servants for two years, phasing out subsidies for gas and transport, and cancelling non-essential infrastructure projects. The deal has helped reassure investors about Argentina’s solvency. But plainly doubts over its monetary policy lingered.

Mr Caputo’s most urgent task is therefore to restore confidence in the central bank. “The smart move would be for Mr Caputo to hike interest rates again at some point over the coming weeks to send a strong message to markets,” says Neil Shearing of Capital Economics, a consultancy. But in comparison with other emerging-market currencies, the peso still looks strong, thinks Mr Shearing. It may have another 10% to fall. The central bank’s overriding task is to avoid a repeat of the panic of 2001 that led to a run on the banks and then default. If it fails, the fall-out will go far beyond the institution and its head.