A victory came to activists in Brazil on Tuesday when a federal judge halted construction on the controversial Belo Monte dam in the Amazon, saying that the indigenous peoples had not been consulted.

The impacts of the dam, which would have been the third largest hydro-electric dam in the world, had long been slammed by indigenous groups and environmental activists who said that it would have displaced thousands and wreaked havoc upon the ecosystem while contributing to greenhouse gases.

When the Brazilian Congress gave approval for the dam in 2005, there were no consultations with the indigenous peoples about the environmental impacts, a fact that Judge Souza Prudente found in violation of the Brazilian Constitution.

“A study on the environmental impact of the project was required before, not after, work on the dam started. The legislation is flawed,” Judge Souza Prudente told O Globo newspaper.

“The Brazilian Congress must take into account the decisions taken by the indigenous communities. Legislators can only give the go-ahead if the indigenous communities agree with the project,” he said.

Souza Prudente remarked at a press conference that “only in a dictatorial regime does a government approve a project before holding consultations.”

Indigenous groups lauded the court ruling. “It’s a historic decision for the country and for the native communities,” said Antonia Melo, coordinator of the Xingu Vivo indigenous movement.

“It’s a great victory which shows that Belo Monte is not a done deal. We are very happy and satisfied.”

Zachary Hurwitz of International Riverswrites that “the decision supports the arguments that the affected tribes have been making over the lifetime of Belo Monte: tribes will facedownstream livelihood impacts as a result of a reduction in the flow of the Xingu River on the 100-km stretch known as the Volta Grande or ‘Big Bend,’ and were never properly consulted, much less gave their consent.”

Hurwitz adds that the economic rationale dam proponents pushed is fundamentally flawed. “Economic rationale for the dam is based on a projected economic growth of 5% or more a year, but over the past few quarters, GDP has been lucky to grow at even a measly rate. As far as Belo Monte’s importance to Brazil’s economic race, this is really a case of the horse following the wagon.”

“And, as illustrated by this historic court decision, the wagon has been trampling on indigenous people and their rights, along the way,” writes Hurwitz.