Brazil's environment agency has backed construction of a hydro-electric dam in the Amazon, opposed by indigenous groups and environmentalists.
The agency, Ibama, said the Belo Monte dam on the Xingu River had been subjected to "robust analysis" of its impact on the environment.
The government says the dam is key to meeting Brazil's growing energy needs.
But opponents argue it will harm the world's largest tropical rainforest and displace tens of thousands of people.
In January, Ibama gave the go-ahead for initial work to begin on the site on the Xingu, a tributary of the Amazon River.
Now, Ibama has issued the penultimate licence that the Norte Energia consortium building the dam needs.
This means, in theory at least, that building work on the dam can begin.
But the federal prosecutor's office in the state of Para, where the dam is located, has already lodged a legal challenge to the project.
Friction with local indigenous communities is also likely to intensify now Ibama has granted the building licence, correspondents say.
The 11,000-megawatt dam would be the third biggest in the world - after the Three Gorges in China and Itaipu, which is jointly run by Brazil and Paraguay.
First planned 30 years ago, it has long been a source of controversy.
Campaigners say the 6km (3.7-mile) dam will threaten the survival of a number of indigenous groups and could make some 50,000 people homeless, as 500 sq km (190 sq miles) of land would be flooded.