A federal judge in Brazil has suspended construction work on a massive dam in the heart of the Amazon rainforest.
In a statement released on Tuesday, Judge Souza Prudente said that work could only resume on the $11bn, 11,000MW Belo Monte Dam after the indigenous communities living in the area were consulted.
The dam has been condemned by environmentalists and rights activists, who say that it would devastate wildlife and the livelihoods of 40,000 people who live in the area that would be flooded.
The government, however, says the dam will be a source of clean, sustainable energy, and that it will help fuel the country's economy.
The dam would be the world's third largest when completed on the Xingu River that feeds the Amazon.
The court noted that when congress approved the project in 2005, it called for an environmental impact study after the start of the work.
Native communities had been given the right to air their concerns in parliament on the basis of that environmental-impact study.
This was not done, the court said.
It said that the Norte Energia consortium in charge of the project will be able to appeal the decision to a higher court.
Norte Energia told AFP it was awaiting formal notification of the court ruling before responding.
The court said the consortium was liable for a daily fine of $250,000 should it flout the order.
"It's a historic decision for the country and for the native communities," Antonia Melo, coordinator of the Xingu Vivo indigenous movement, said.
"It's a great victory which shows that Belo Monte is not a done deal. We are very happy and satisfied."
About 12,000 workers are due to be working on the dam's constructions, 24 hours a day, by the end of the year. Up to 22,000 are scheduled to be at the site by next year.
Work on the dam began a year ago, despite fierce opposition from local people and environmental activists.
Indigenous groups fear the dam will harm their way of life while environmentalists have warned of deforestation, greenhouse-gas emissions and irreparable damage to the ecosystem.
Belo Monte is expected to flood an area of 500sq km along the Xingu and displace 16,000 people, according to the government, although some non-governmental organisations (NGOs) put the number at 40,000 displaced.
Some 150 indigenous activists recently occupied one of the dam's four construction sites for three weeks to demand that Norte Energia honour commitments made to their communities.
The federal government plans to invest a total $1.2bn to assist the displaced, by the time the dam is completed in 2019.