El Salvador has become the first country in the world to ban the mining of metals.
The law bans prospection, exploration, exploitation, extraction or processing of metallic minerals in El Salvador.
Some Latin American countries thrive on mineral exports but local communities complain of environmental risks from toxic metals used in the process.
The new law entered into force after being signed by President Salvador Sanchez Ceren.
El Salvador says it will protect poor rural communities threatened by proposed mining projects. The country has had disputes with powerful foreign mining firms in the past.