Peru's government has cancelled a vast copper mining project after clashes between police and protesters left three people dead earlier this week.
The mining ministry said the environmental impact assessment presented for the $1bn (£600m) project was "inadmissible".
Local residents had been protesting against the proposed mine, saying it could contaminate water supplies.
The Tia Maria project is located near the city of Arequipa in southern Peru.
It was being developed by Southern Copper, the world's second-biggest copper mining company, and was meant to start production in 2012.
But thousands of farmers and other residents of Islay province have been blocking roads in protest at the development.
"As a result of the conflict in Islay over the project, Tia Maria has come to an end," Energy and Mines Minister Pedro Sanchez said.
He added that the company would have to end all mining activity and withdraw its equipment and installations.
Southern Copper will have to present a new environmental study if it wants to press ahead with the project, which has already been delayed several times because of environmental concerns.
Mining exports are driving an economic boom in Peru, but environmental protests against new developments are frequent.
How to share the economic benefits of the country's mineral wealth has been a major issue in campaigning for Sunday's presidential election.
Peru is the world's third largest copper producer.