The Bento Rodrigues district is pictured covered with mud after a dam owned by Vale SA and BHP Billiton Ltd burst in Mariana, Brazil, November 6, 2015. REUTERS/Ricardo Moraes

BRASILIA (Reuters) - Samarco Mineracao SA [SAMNE.UL] will pay at least 20 billion reais ($5 billion) over 15 years as part of a deal reached with the Brazilian government to settle a lawsuit for damages caused by a deadly dam spill at a mine in November, a government source told Reuters on Tuesday.

Samarco, a joint venture between Vale VALE5.SA and BHP Billiton BLT.L, will pay 4.4 billion reais in the three years following the agreement that will be signed on Wednesday, said the official who requested anonymity since the information was not yet public. The rest of the funds will be released in the following years.

Regarded as Brazil’s worst environmental disaster, the burst dam killed 19 people, forced hundreds to leave their homes and polluted one of the country’s main rivers.

The deal comes after Vale announced a fourth-quarter net loss of $8.57 billion, its worst ever as a private company, and BHP recorded its first loss in more than 16 years for the six months to Dec. 31.

BHP Billiton declined to comment on terms of any agreement, but reiterated that an agreement was close.

Press representatives with Vale and Samarco were not immediately reachable for comment.

The dam burst revealed a series of mistakes by under-funded mining and environmental regulators in one of the world’s top iron-ore producer, triggering a debate over harsher mining controls in Congress.

Brazilian police in the state of Minas Gerais last week accused six Samarco executives and one contractor of murder in connection with the deaths caused by the dam spill.

($1 = 3.9260 Brazilian reais)