RIO DE JANEIRO (Reuters) - Brazilian prosecutors charged 21 people with qualified homicide on Thursday for their roles in the collapse of a tailings dam at the Samarco Mineração SA iron ore mine last November that killed 19 people.

A general view of the work site of a iron ore mine operated by Samarco owned by Vale SA and BHP Billiton Ltd in Mariana, Brazil, November 11, 2015. REUTERS/Ricardo Moraes

The charges follow what is now considered to be the largest environmental disaster in Brazil’s history. The dam collapse released millions of tonnes of muddy mine waste, wiping out several small communities.

Samarco, its co-owners Vale SA and BHP Billiton Ltd, and Brazilian engineering company VOGBR Recursos Hidricos e Geotecnica Ltd which certified the dam’s safety, were charged with environmental crimes.

BHP, Vale and Samarco officials said in statements that they rejected the charges and would defend their employees and executives. VOGBR declined to comment.

Vale, BHP and Samarco agreed in March to pay an estimated 20 billion reais ($6.37 billion) over 15 years in civil damages, but the accord is being challenged by state prosecutors.

Prosecutor Jose Leite Sampaio told reporters at a briefing in Belo Horizonte, broadcast live by GloboNews, that executives at Samarco had clear awareness the dam could fail but ignored the risks and prioritized profit.

There were signs that the dam was unsafe for several years before its collapse, but Samarco officials, executives, employees and board members appointed by Vale and BHP failed to take proper action, Sampaio said.

Prosecutors also said safety and regulatory procedures were not properly followed, including those in the company’s own operating manual.

If convicted the accused, who include 16 Brazilians, two Americans, a Briton, a South African, an Australian and a French citizen, could face sentences of up to 54 years, prosecutors said. The former chief executive of Samarco, Ricardo Viscovi, is among the accused. Charges against one of the suspects did not include homicide.

Under Brazil’s criminal code, qualified homicide is homicide aggravated by certain factors.

Following the collapse, thick reddish-brown sludge flowed into one of Brazil’s main rivers, the Rio Doce, killing fish and fouling water supplies for hundreds of km (miles) before reaching the Atlantic Ocean.

Before the case goes to trial, the charges need to be approved by a judge. Prosecutors filed the charges with a judge in Belo Horizonte, Brazil earlier in the day.

“These people were murdered,” Eduardo Santos de Oliveira, one of the prosecutors in the case, said of those who died.

Vale said in a statement that prosecutors ignored evidence that executives were unaware the dam could fail before the disaster occurred.