Foreign investors in mineral-rich Mongolia hope parliament will revoke a controversial law banning mining in the country's river and forest areas when it convenes for its busy autumn session next month.

The ban, imposed in 2009, has been derided as half-baked and knee-jerk by representatives of foreign mining investors in Ulan Bator. While dozens of projects have been shut down, hundreds more remain in operation, but in a state of legal limbo.

Nobody really knows which projects are banned -- the problem is you don't know if you will wake up one morning and find that laws have changed and your mine is no longer legal, said a representative with a foreign mining firm in Ulan Bator.

Hundreds of foreign firms have been coveting Mongolia's copious and mostly untapped deposits of coal, copper, gold and uranium, but legal and political uncertainties cast a shadow over their investments, and analysts worry that the country could lose out.

Is Mongolia the place to be, or is it Colombia? asked Bernard Guarnera, president of mining consultants Behre Dolbear. We vote Mongolia but mining companies have to make a decision based on certainty and stability.

Nearly 2,000 mining licenses came under review as a result of the 2009 law and hundreds were suspended, but Mongolia is not yet able to enforce the rules in full because it does not have the funds to pay compensation.

I hope this law will be cancelled, said Chuluuntseren Otgochuluu, the director of an independent think tank called the Economic Policy and Competitiveness Research Centre.

This law is very good in context of health and the environment, but the problem is that many licenses have already been issued and the mines are already operating, and have been taken by banks as collateral. The cost of taking them is huge, and we will also lose trust.

TOO MUCH TOO LATE

Following the democratic revolution of 1990, isolated Mongolia was desperate to attract as much foreign investment as possible, but a decade of laissez-faire regulation put the country's scarce water supplies in jeopardy, and soaring commodity prices also prompted a policy rethink.

It was a parliamentary backbencher who introduced the water and forest bill, which was passed despite opposition from the government.

The problem, said Chimed-ochir Bazarsad, Mongolia representative with the Worldwide Fund for Nature (WWF), was timing. Had Mongolia defined where miners could operate before the boom began, it wouldn't have the problems it is facing today.

At the end of the 1990s we tried to map out where are the ecologically important areas that need to be protected in terms of watersheds, biodiversity and cultural value -- it should have been very clearly defined before the boom, he said.

The government didn't do it and now it is trying to determine no-go areas after already issuing the mining licenses, so now it is all about negotiation.

The president, Tsakhia Elbegdorj, has suspended approvals of all new mining projects until comprehensive new regulations are drawn up.

As technically illegal mining operations continue to operate, environmentalists have tried to take the law into their own hands, with activists even known to attack mines with hunting rifles in order to disable machinery.

Some say it has not only caused uncertainty among investors, but has also given opportunities to ninja miners -- illegal privateers armed with pans and shovels who pay no regard to the environment.

Most of the ninjas were driven into the perilous industry 10 years ago when a catastrophic winter killed off much of their livestock.

Chimed of WWF said the ninja miners were impossible to regulate, and were now entrenched in their communities with well-established trade networks.

Mongolia has a history of introducing and then hastily repealing populist legislation aimed at squeezing more revenues from its mining boom. In 2001, it revoked a gold export tax imposed in 1998, and a mining windfall profit tax was also cancelled in 2009 after two years of complaints.

While many hope the forest and water law will also be repealed, its parliamentary backers are determined to keep it. Environmentalists also say revoking the law would be equally knee-jerk.

Dugersuren Sukhgerel, executive director of an non-government organisation known as Oyu Tolgoi Watch, said it was clear that miners were gaining too much influence in Mongolian politics.

The miners say 'give us the right environment', but what they mean is 'give us a lawless environment', she said.