The company running an iron ore mine whose dam break caused the worst environmental disaster in Brazil's history has agreed to initially pay 4.4 billion reais ($1.1 billion) to clean up the Doce River over the next three years

Samarco says in a Wednesday news release that it will pay the money to a foundation in charge of restoring the river basin. Beginning in 2019, the company will fund the foundation's annual budget of 800 million to 1.6 billion reais ($205 million to $410 million).

The dam mine failed in November, unleashing a flood of toxic mud that killed 19 people, wrecked several towns and damaged the environment along the river.

Samarco is a joint venture of the giant mining companies Vale of Brazil and BHP Billiton of Australia.