Deciding that water and the environment are most important, El Salvador's congress approved a landmark law to ban the mining of all metals.  It's believed the first such blanket ban in the world.

The legislation got the votes of 69 out of 84 lawmakers, with the support of all parties.  "Today in El Salvador, water won out over gold," tweeted lawmaker Johnny Wright Sol of the center-right Arena party.

"Mining is not an appropriate way to reduce poverty and inequality in this country," said Ivan Morales, the charity Oxfam's country director in El Salvador.  "It would only exacerbate the social conflict and level of water contamination we already have," he added.

Human rights prosecutor Raquel Guevara called it "a historic day for El Salvador."

A few other nations have bans on strip mining, open-pit, or artisanal mining for metals.  But El Salvador's ban goes much further.  The bill passed outlaws any underground, above-ground, or heap-leaching techniques.  This includes a moratorium on exploration, extraction, or processing ore with techniques that often involve cyanide or mercury.

"Mining is an industry whose primary and first victim is water," said Andres McKinley, a mining and water specialist at Central American University in San Salvador.  "We are talking about an issue that is a life-or-death issue for the country."

Mining for salt, stones or sand will still be allowed.

This caps off a long-running dispute that has links to Australia.  In 2005, Pac Rim Cayman was denied a permit for a mine and sought compensation.  Tensions grew, and clashes around the proposed mine led to the deaths of several anti-mining activists

The de facto ban on permits began with the center-right Arena Party and was continued by the two successive governments led by the Left-wing Farabundo Marti National Liberation Front.  Meanwhile, Pac Rim was acquired by the joint Australian-Canadian OceanaGold company, which continued the compensation quest.  But last October, a World Bank arbitration panel ruled in favor of El Salvador and rejected OceanaGold's claims for compensation.

The panel also ordered the company to pay El Salvador $8 million for legal costs.  But lobbying groups say the company has not paid up.