Indonesia will force foreign firms to sell down stakes in mines by the 10th year of production, with domestic ownership to be at least 51 percent, in a move likely to hurt existing miners and scare off potential investors.

The new rule is the latest government move to extract greater domestic profit from the vast mineral wealth in the world's top exporter of thermal coal and tin.

The requirement, stated in a regulation on the mining ministry's website, comes as the government is renegotiating contracts with the leading foreign metals miners in the country, Freeport McMoRan Copper & Gold Inc and Newmont Corp .

Southeast Asia's largest economy contains some of the world's richest mineral deposits, such as the Freeport-run Grasberg, the world's largest gold mine, and its fast-growing mining sector accounts for about 11 percent of GDP.

It was not clear if the regulation, effective from February 21, will apply only to new investors or also to existing mining investors.

Holders of mining business permits and special mining business permits, in terms of foreign investment, are required to divest the shares gradually 5 years after production, so in the 10th year the shares are at least 51 percent owned by Indonesian entities, the regulation stated.

After steep rises in commodity prices over the last decade, Indonesian politicians have become increasingly vocal in their demands to improve deals with mining companies, many of which were made in the era of former autocratic leader Suharto.

The 2009 mining law was aimed at boosting investment in mining and metals processing, but its supporting regulations have not gone down well with the industry, and new investors still face risks such as policy reversals, local community demands, a tortuous permit process and poor infrastructure.

Another previous regulation aimed to ban exports of some unprocessed metals from 2014, despite widespread industry pleas to delay the plan, in a move that could cripple miners' profits, cut global supplies and boost prices.

(Reporting by Rieka Rahadiana and Aditya Suharmoko; Writing by Neil Chatterjee; Editing by Ian Geoghegan)