BRASILIA (Reuters) - Brazil filed a lawsuit on Monday against two of the world's largest mining companies for 20 billion Brazilian reais ($5.2 billion) to clean up what it says was its worst environmental disaster, caused by the collapse of a tailings dam.

The governments of Brazil and those of two states hit by the damburst sued iron ore operator Samarco and its co-owners, the world's largest miner BHP Billiton Ltd and the biggest iron ore miner Vale SA.

Earlier on Monday, President Dilma Rousseff blamed the disaster on the "irresponsible action of a company" in a speech to the COP21 climate change summit in Paris. "We are severely punishing those responsible for this tragedy," she said.

While they are going to court, Brazilian authorities are looking for a settlement similar to the $20.8 billion agreement reached by the U.S. government with oil firm BP Plc following the 2010 Deepwater Horizon spill in the Gulf of Mexico.

However, in a civil lawsuit brought by business owners and others, a judge in 2014 ruled that BP was primarily responsible for the spill and had to pay up to $18 billion in penalties on top of the previous payments made.

The Nov. 5 damburst in Minas Gerais, Brazil's main mining state, unleashed 60 million cubic meters of mud and mine waste that demolished a nearby village, killed at least 13 people and polluted a major river valley, killing fish and reaching the Atlantic Ocean.

The lawsuit filed in federal court in Brasilia required Samarco to take immediate action to contain and reduce the environmental impact of the damburst, the chief prosecutor of the coastal state of EspĂ­rito Santo, Rodrigo Vieira, said.

The lawsuit seeks at least 20 billion reais that would be administered by a private fund over 10 years to pay for the recovery from the environmental disaster and its social impact on communities near the mine and along the Rio Doce river basin.

Samarco would be required to set up the fund to be managed independently by non-governmental groups, such as a committee of inhabitants of the river basin and Instituto Terra, a local environmental nonprofit started by world renowned photographer Sebastian Salgado.

"If Samarco does not have the financial resources to cover payments over 10 years, Vale and BHP will be held responsible for providing their shares," Vieira told Reuters by telephone.

BHP, whose shares have fallen 20 percent since the dam burst, said on Tuesday it would consider the matters raised in the court documents "in due course."

Vale and BHP announced last Friday that they would create a fund with Samarco to help in the clean-up of the Rio Doce and its tributaries affected by the disaster. They did not detail the size of the recovery fund.

Samarco has already been fined 250 million reais by Brazil's environmental agency, Ibama, for the disaster, which covered the flood plain in mud for 80 km. Drinking water supplies for a quarter of a million people had to be closed off.

Brazil hopes to sit down with the miners and settle out of court, Vieira said. "The big oil spill in the Gulf of Mexico is a good precedent of how to agree on funds for environmental and socioeconomic recovery," he said. "That's our goal."