Samarco and its parent companies BHP and Vale have signed a deal to settle a $7 billion lawsuit.

The deal with Brazilian prosecutors relates to a 2015 mining disaster at the Samarco iron ore mine.

The incident saw a dam burst and cause a flood that killed 19 people and destroyed several Brazilian communities, displacing thousands of people.

BHP has issued a statement saying it would establish a fund with the other companies “for clean-up costs and remediation and for compensation of impacts relating to the Fundão tailings dam failure”.

The agreement was reached with the Brazilian Government, the states of Espirito Santo and Minas Gerais, and prosecutors.

The companies have also arranged an agreement to suspend a further $55 billion settlement by two years.

During that time, the parties will renegotiate the larger settlement.

The Renova Foundation, which is responsible for clean up and remediation, will be restructured. Six of Renova’s seven board members are from BHP, Vale and Samarco.

Under the restructure, local communities will have more say in its operation, with three of four additional members appointed from communities affected by the disaster, and another from the public defence office.

BHP has not disclosed the exact amount of the settlement so far.