Indonesia has kicked off the new year with a total ban on exports of nickel, tin and bauxite, a warning that resource nationalism remains a potent force despite the commodity slump.

Nickel prices jumped to a two-week high of $14,190 a tonne in London as markets brace for a 20pc loss in global supply, restricting a vital alloy for stainless steel production.

Gayle Berry, from Barclays, said the ban comes at a time when industrial metals are moving towards deficit after a near-record surge of output in 2013. “If the ban remains for long, it will create a supply shock. We think that nickel looks undervalued,” she said.

The drastic move comes as Africa’s oil and gas states are drawing up laws to restrict foreign companies. In South Africa, calls are growing for the nationalisation of the mining industry.

Several Latin American states are tightening quotas or imposing new taxes. The willingness of populist governments to do this even after a 30-month slide in commodity prices suggests that nationalist measures may come back with a vengeance once the resource cycle picks up.

Risk analysts Maplecroft said 15pc of countries have seen a rise in resource nationalism over the past four years, ranging from “creeping” quotas to outright expropriation, notably Argentina’s seizure of the Spanish-owned oil group YPF. It lists Zimbabwe as the top risk, followed by Venezuela, Congo, Bolivia, Iraq and Kazakhstan. Russia is 14, Argentina 20 and Indonesia 24 - worse than Iran.

Jero Wacik, Indonesia’s energy minister, said the ban is designed to “enhance the value” of the country’s mining industry by forcing companies to invest in smelters and refineries, a step towards a broader manufacturing base. The country is determined to avoid the “resource curse” that has bedevilled raw material producers over the years.

It was widely assumed that the government would have to suspend the ban given the fragility of the Indonesian economy, already facing capital flight and a currency slide as the US Federal Reserve winds down global liquidity.

“Indonesia wanted to signal that they are not crying wolf this time, as they have done before,” said Robin Bahr, base metals strategist at Societe Generale. “We think they will have to back down and give companies more time and higher export quotas, otherwise this will do too much damage.”

Indonesia has issued a reprieve for copper exports to reduce the immediate shock to its own economy, and to placate Freeport-McMoRan and Newmont Mining. The rupiah rallied but critics in parliament accused the government of “selling out” to foreign companies.

Danny Keating from the mining group Alufer said the bauxite ban could be the biggest headache. China relies on Indonesia for 80pc of its supply, used in aluminium.

Indonesia produced 20pc of global bauxite supply in final months of last year, specialising in the low-heat variety used by the Chinese. Mr Keating said it would take years to crank up supply from Australia.

“There is no easy fix to this. We’re going to see a dramatic under-supply within six months to a year. A price boom is coming,” he said.

The Indonesian ban faces a legal challenge from the country’s own mining association in concert with foreign investors. It may also face a probe by the World Trade Organisation (WTO).

The WTO typically rules on cases involving curbs on imports of goods, but export bans can also be a violation. The panel ruled against China’s restrictive quotas on rare earth metals, used in hi-tech industry. The WTO’s environment clause - Article 20 - allows countries to impose export bans for ecological reasons or to curb pollution.

Resource controls are a complex moral theme. The line between nationalism and sovereign self-defence is not always clear. The United Nations says some global agri-business companies are abusing the system. They purchase large areas of land cheaply, extracting a few years of quick profit before pulling out once the soil has been degraded.

Nick Holland, chief executive of Gold Fields, said resource nationalism “strikes fear into mining executives” but they only have themselves to blame for pretending that cash costs are the true costs of production. By exaggerating their profits they have made themselves an “easy target” for governments.