A controversial U-turn on mineral exports has sparked turmoil in Indonesia's key mining sector, providing a fresh headache for firms struggling to work in Southeast Asia's biggest economy.
Despite sitting atop some of the world's most abundant natural resources, successive governments have failed to take advantage of its vast riches, with critics blaming badly thought-out and nationalistic policies that make the country an uncertain place to invest.
And the latest overhaul has sparked a potentially damaging standoff with one of the United States' biggest miners and a major investor in the country.
Jakarta in January relaxed a 2014 landmark ban on shipments of raw mineral ores, which was originally aimed at spurring the domestic smelting industry but led to mine closures, job losses and a fall in government revenues.
While some firms may stand to benefit from the sudden rollback, it has infuriated companies that invested large amounts in Indonesia on operations for smelting, the process of extracting metals from their ores.
In addition, the government asked firms to sign new permits that critics say offer less protection -- triggering a standoff with US giant Freeport-McMoRan, which has stopped shipments from its huge copper and gold mine in the east.
The move is the latest in a series of regulatory changes from the government that have caused jitters among miners, with some foreign firms choosing to exit Indonesia rather than deal with such an unpredictable environment.
"One of the inherent problems in the Indonesian mining industry over the last few years has been the lack of consistency in government policy, with the government changing its mind quite regularly and unexpectedly," Bill Sullivan, a Jakarta-based lawyer and mining expert, told AFP.
Authorities have raised taxes and royalties on shipments and demanded that foreign miners reduce the stakes in their Indonesian operations to less than half.
- Heading for the exit -
In June US gold mining giant Newmont sold its share in an Indonesian mine to local investors after more than three decades operating in the archipelago, citing more onerous regulations as a factor.
And Rio Tinto, the world's second-biggest miner, is reportedly considering walking away from its stake in Freeport's vast Grasberg mine in Papua province owing to the current row.
Economic nationalists have pushed putting stricter conditions on foreign firms in a bid to reap greater profits from the industry, but critics fear the moves could backfire by scaring off investors at a time policymakers are already struggling to reignite slowing economic growth.
As resource-rich nations benefit from a jump in commodity prices after years of declines, the regulatory uncertainty means Indonesia may not fare as well.
The latest policy change has sparked a fierce row with Freeport, which says it has given the government more than $16.5 billion in taxes and other payments since 1991.
The US miner has refused to bow to the government's demands to sign a new deal without additional assurances, stopped work at Grasberg -- the world's second-biggest copper pit -- started laying off workers, and threatened to sue the government.
"Right now we are at an impasse with the government," Freeport chief executive Richard Adkerson said during a visit to Jakarta last month.
Under the changes to Indonesia's export ban, miners will be able to export nickel ore and bauxite as well as concentrates of other minerals under certain conditions, instead of having to process them in Indonesia.
The amendments went further than analysts had expected, although some exports are still banned.
For investors who have already ploughed money into constructing smelters, including many Chinese firms, the U-turn on the ban is a disaster.
"People who have invested millions of dollars in Indonesia can only pray now that the government will revoke the regulation," said Jonatan Handojo, executive director of Indonesia's main smelter industry association.
Despite the outcry, officials are unrepentant with the finance ministry predicting the reversal could boost government coffers by $3.12 billion in the next five years.
Even if the government does not hit such an optimistic target, the policy overhaul may still turn out to be a good thing in the long term, said mining expert Sullivan.
"Indonesia is clearly being forced to rethink its position regarding resource nationalism and focus more on economic reality," he said.