A Brazilian judge has suspended construction work on what would be one of the largest dams in the world. It's a major coup for indigenous groups living in the Amazon.

Judge Souza Prudente ruled late Tuesday that work could only resume on the $11-billion US Belo Monte Dam after native communities living in the region were consulted.

"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 wrote.

Environmentalists and native rights groups have condemned the project, saying it will destroy wildlife and devastate the livelihoods of as many as 40,000 residents.

The government has argued the dam would make the country more self-sufficient, especially in the Amazon region, which relies on fossil fuels.

The Norte Energia consortium is building the dam on the Xingu River that feeds the Amazon in the north-central part of Brazil.

The judge has imposed a fine of $250,000 US a day should the company continue work. Norte Energia said it would appeal the decision to a higher court.

Work on the dam began a year ago and was expected to continue, with up to 22,000 workers working around the clock to complete it by 2019.

Belo Monte is expected to flood an area of 500 square kilometres, displacing more than 15,000 people according to government estimates. However, non-government organizations have pegged that number at 40,000.

For three weeks now, about 150 indigenous people have been occupying one of the dam’s four construction sites.