According to Mining News Pro -Samarco, BHP and Vale’s joint venture in Brazil, has reached a final compensation deal with local prosecutors over the 2015 collapse of a dam, which killed 19 people and became the country’s worst ever environmental disaster.

The definitive agreement comes almost three years after the deadly incident that has already cost Samarco 4.4 billion reais (about $1.2 billion) on repairs and compensation, according to a statement quoted by Reuters.

The settlement means compensation payments to relatives of those who died in the disaster, as well as to hundreds of others who lost homes and other properties can begin. It also means the companies might be able to get ready to resume operations in the region.

Samarco had said Monday it would start preparation work for a new pit for the disposal of tailings next week, in the same area where the one that failed was located. The new facility will have an overall capacity of 16 million cubic meters.

The environmental catastrophe happened when a dam designed to hold back mine waste from the Samarco iron pellets operation burst, leaving a trail of destruction for hundreds of kilometres in Minas Gerais and Espírito Santo States.

Brazilian federal prosecutors believe that both BHP and Vale failed to take actions that could have prevented the disaster. But the companies have repeatedly said they were not responsible for the dam’s collapse, adding that they complied with Brazilian law and that safety was and has always been a key concern.

Samarco, which was once the world’s second-largest iron-ore pellet operation, has been shuttered since the deadly dam spill that washed downstream into neighbouring state Espírito Santo and even reached the Atlantic Ocean, 600 kilometres away.

In December, Samarco was granted a preliminary permit to begin work towards preparing an eventual restart, which is likely to happen — though at a reduced rate first — in the second half of the year.

Earlier this year, BHP announced that it had settled an initial $7 billion in damages with the Brazilian Government in order to provide a two-year window for the settlement of a larger $55 billion civil claim.

It also said it would commit $211 million to the Renova Foundation created to help victims of the Samarco dam disaster in Brazil.

Rio de Janeiro-based Vale (NYSE:VALE) is the world`s number one iron ore producer and BHP (ASX, NYSE:BHP) (LON:BLT) comes in at number three, behind fellow Australian miner Rio Tinto (ASX, LON:RIO).