The Ashaninka indigenous community in Brazil has won a two-decade federal court dispute against illegal logging interests, receiving $3 million in compensation and an official apology from companies for cutting down thousands of mahogany, cedar, and other tree species in the Kampa do Rio Amônia Indigenous Reserve.

The settlement was finalized April 1, according to a press release from the federal public prosecutor.

Starting in the early 1980s, timber companies owned by the Cameli family illegally harvested mature trees from the Ashaninka’s ancestral land to supply the European furniture industry. As part of the new settlement, the companies apologized “for all the ills caused” and acknowledged “the enormous importance of the Ashaninka people as guardians of the forest, zealous in the preservation of the environment.” The $3 million reparation will go directly toward projects protecting the Ashaninka community and Amazon forest.

Experts said the case could serve as a legal precedent in other indigenous and environmental lawsuits in Brazil. “What we did here was to comply with the Constitution, understanding that the indigenous people have sacred rights guaranteed by the Magna Carta,” Augusto Aras, Brazil’s Attorney General, said in a statement. “You have the right to have a decent life, materially speaking, to choose your own destiny, to take part in political decisions, with respect to isolated communities.”