“The president was very conscious from the first day that he had to go as quickly as possible,” says Mr. Peña, the chief of cabinet ministers. “When you’re a broke and broken country, you have to build a shock in terms of credibility.”

In the first years of Mr. Macri’s administration, the government lifted controls on the value of the peso while relaxing export taxes. The masters of international finance delivered a surge of investment. The economy expanded by nearly 3 percent in 2017, and then accelerated in the first months of last year.

But as investors grew wary of Argentina’s deficits, they fled, sending the peso plunging and inflation soaring. As the rout continued last year, the central bank mounted a futile effort to support the currency, selling its stash of dollars to try to halt the peso’s descent. As the reserves dwindled, investors absorbed the spectacle of a government failing to restore order. The exodus of money intensified, and another potential default loomed, leading a chastened Mr. Macri to accept a rescue from the dreaded I.M.F.

Administration officials described the unraveling as akin to a natural disaster: unforeseeable and unavoidable. The drought hurt agriculture. Money was flowing out of developing countries as the Federal Reserve continued to lift interest rates in the United States, making the American dollar a more attractive investment.

But the impact of the Fed’s tightening had been widely anticipated. Economists fault the government for mishaps and complacency that left the country especially vulnerable.

Some people accuse the Macri administration of a cowardly pursuit of gradualism, cutting spending too slowly in a fruitless effort to avoid enraging the masses. Argentina sold $100 billion in government bonds during Mr. Macri’s first two and a half years in office, exploiting its newfound favor with the international finance set. The cash allowed the government to maintain some social programs.

“Everybody wants to lend you money, so why should you be so cheap?” says Fausto Spotorno, the chief economist at Orlando J. Ferreres & Associates, a consulting firm in Buenos Aires. “They believed they could postpone the crisis and gradually get out of it.”