Get out and stay out! You could almost hear the door being slammed on Vale (NYSE:VALE)  after it reached an agreement with Argentina's government over closing down its potash project in the country's Mendoza state.

Following the disastrous monetary policies that caused inflation to soar and after labor unions began placing untenable demands on it, the Brazilian miner announced in March that it would abandon the Rio Colorado mine into which it's already sunk some $2 billion. Having originally estimated that the project would cost less than $6 billion, cost overruns have caused the price tag to rocket higher to almost $11 billion.

Believing it was better to cut its losses, Vale said it would be better off if it just left. However, an Argentinean court forbade the miner from doing so and also ordered it not to touch its equipment either. The government views Rio Colorado as a strategic asset for the country, and if Vale took out the machinery necessary to keep the mine operational, it would face heavy fines. It also ordered it to continue paying the miners' salaries.

However, Vale was able to come to an agreement with the government, and in the end it will have to pay the miners two and a half times their monthly salaries paid out over five months. There are approximately 4,000 miners at Rio Colorado, 2,900 of which are in Mendoza, so Vale's bill won't be cheap, but it's cheaper than having to stay.

In a concession to the miner, however, Vale's existing concession at the mine will remain intact for up to four years, and it will be allowed to seek out a buyer or a partner for the project.

Mining in South America is no longer the easy path to riches it was once believed. Barrick Gold (NYSE:GOLD) had its Pascua-Lama gold mine in Chile shut down following a dispute with the government and local indigenous tribes, while Newmont Mining (NYSE:NEM) had its Peruvian Conga gold project halted.

Vale isn't completely abandoning South America, as it is opening up an iron ore mine in Brazil, but it is divesting a Canadian potash project. That's in line with actions taken by other miners such as BHP Billiton and Rio Tinto, which are selling off unproductive assets to focus on core operations.

As Argentinian President Cristina Kirchner takes a hard-line stance against industry in the country and chooses to follow the path of her late mentor, Venezuelan strongman Hugo Chavez, Vale no doubt doesn't mind the door swinging shut and hitting it on the way out.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.