London (CNN Business) Argentina is taking desperate action to keep dollars in the country as it tries to prop up its collapsing currency and avoid defaulting on its debt for the third time since 2000.

The government of President Mauricio Macri, who is trailing his opponent ahead of a general election in October, said this weekend that the central bank will need to authorize dollar purchases, and companies will need to quickly repatriate dollars earned overseas. The order takes effect on Monday, with some exceptions for small investors.

The move is an attempt to stop money pouring out of the country and shore up the country's foreign currency reserves, which are being depleted rapidly as Argentina attempts to support the peso.

The currency plunged by more than 35% against the US dollar in August. Investors were panicked when left-winger Alberto Fernández beat out Macri in a primary vote on August 11, a major upset indicating that he could win a national election set for October 27. Argentina's foreign exchange reserves now sit at $58 billion, down 25% from a peak in April, according to Capital Economics, a research firm.

The currency crisis poses a huge risk to Argentina, which signed on to a $57 billion bailout with the International Monetary Fund last year. It previously defaulted on its debts in 2001 and 2014.

Read More