FILE PHOTO: The debris of the municipal school of Bento Rodrigues district, which was covered with mud after a dam owned by Vale SA and BHP Billiton Ltd burst, is pictured in Mariana, Brazil, November 10, 2015. REUTERS/Ricardo Moraes/File photo

(Reuters) - Mining heavyweight BHP said on Thursday a federal court in the Brazilian state of Minas Gerais approved an agreement between miner Samarco and Brazil authorities, marking a milestone in the legal battle over a deadly 2015 dam failure.

A 20 billion reais ($5.3 billion) lawsuit against Samarco, which is a joint venture of BHP and Vale SA, was quashed by the accord, which was signed in June. An even more expansive lawsuit was also suspended under the agreement.

The company said it had separately agreed to pay $50 million as part of a settlement for a class-action complaint filed by American depositary receipt (ADR) holders over the disaster.

Bryan Quinn, BHP’s head of non-operated joint ventures, said in an interview in Sao Paulo that the deal “creates a more stable legal and institutional environment for ongoing work and negotiations.”

“There is still a lot of work to do and a long way to go on many fronts,” he added. “We now have even more stakeholders involved than in the past, which is positive, but it also means that activity doesn’t always move as quickly as we would like.”

Samarco told Reuters in a statement on Tuesday that next year it expects to obtain licenses needed to resume operations.

Operations have been paralyzed for nearly three years since a dam holding back waste at the mine burst, killing 19 people and leaving a trail of destruction for hundreds of kilometers.

BHP still faces a class action in Australia over the dam’s failure.