Indonesia has been losing out on business farther up the supply chain. Its mines produced 271,000 metric tons of nickel alone in 2013, and one might think that would lead to a healthy trade in refining and smelting. But that has not been the case, because trade partner China has been buying up huge stores of nickel and other raw ores from Indonesia, and doing the processing itself.

Other mineral-rich countries, such as the Democratic Republic of Congo, face similar dilemmas. While they need the business, those ores are exported to be processed elsewhere, depriving the country of origin of the added jobs and revenues that ore processing would bring.

But Indonesia, which is the world’s largest exporter of nickel ore, refined tin and thermal coal, as well as a major producer of bauxite and the site of the fifth-largest copper mine and top-producing gold mine in the world, has decided to act. Earlier in January it instituted a ban on mineral exports aimed at bringing home more processing business.

Indonesia’s goal, of course, is to compel foreign purchasers of its ore to invest in smelting and refining facilities to process the ore before it leaves the country. Indonesia has few of its own such facilities in place. Investments in processing plants would increase the country’s income from its natural resources and at the same time develop additional industries, as well as provide additional jobs besides mining. However, in the short term, more than100 mines have shut down and thousands of miners have been laid off.

While the ban is not complete—U.S.-based Freeport-McMoRan and Newmont, the two largest mining companies operating in the country, have temporary exemptions—it has certainly made itself felt, with laid-off miners protesting in the streets in Jakarta and challenges in court from the Mineral Entrepreneurs Association.

In addition, the loss of sales from ore exports is huge, with nickel and bauxite alone accounting for more than $2 billion annually. The country’s finance minister has said that the ban could cut government revenues by up to $820 million for 2014. According to Indonesia’s central bank, ore and concentrate exports amounted to some $500 million in value per month from January of 2013 to October. That’s a big bite out of the country’s economy.

A surprise inclusion in the legislation that halted nearly all other shipments was a progressive tax on concentrates—unrefined ore with waste such as rock and sand removed—that levies a 20% tax on concentrates of lead, iron, zinc, ilmenite, titanium and manganese. While the tax will remain at 20% for the duration of 2014, it will increase as time passes, to reach 60% by the second half of 2016.

Indonesia is not alone in the struggle to transition its ore exports from raw to processed. Congo, which had planned to institute its own ban on ore exports on Jan. 1, was forced to postpone it until 2015 because it lacks sufficient electrical power to process the ores at home. The African country, which is the largest producer of cobalt and the fifth largest of copper, nevertheless has instituted a $100 tax per metric ton on concentrated exports. In 2014 it will focus on expanding available electrical power so that it will be in a better position to take advantage of any refining and smelting facilities that might be built as a result of its actions.

The Indonesian ban will take a toll on China, which spent much of 2013 stockpiling both nickel—used in the production of stainless steel—and bauxite to fuel its factories’ demand for the ores. Indonesian Industry Minister M.S. Hidayat was quoted in news reports on Jan. 8 saying, “I just returned from China, and I saw with my own eyes 3 million tons of bauxite and 20 million tons of nickel ore over there. That’s what we want to stop.”

Chinese demand for ore is indeed massive; in July of 2013, Zacks forecast its steel consumption rising for 2013 by 3.5% to 66.8 megatons. And huge as they are, China’s stockpiles will only last so long. While it’s looking to the Philippines as an alternate source of ore—metals indexes there have already risen on the ban—and possibly Australia as well, in the long run it will likely have to return to Indonesia at some point.

Nickel stocks rose after the ban went into effect, not just in the Philippines but around the globe.

John Blank, chief equity strategist at Zacks, said, “You’ve got to step up in the value-added chain to get higher-wage jobs. [You have to] build smelters and sell ingots, not raw materials. It doesn’t take a genius to figure this out…. Countries are checking out the value chain [of selling processed rather than unprocessed minerals].” If the development of smelting and refining industries had been possible without government intervention, he said, “It would have happened, and it didn’t.” So it’s no surprise that the government stepped in. The mining companies] should have been prepared for this, and should be cooperating with these countries. They’re only looking out for their interests.” That could indicate that other countries may soon follow where Indonesia leads,” he said.