For months the residents of Brumadinho laid sullied garments and makeshift crosses around a monument at the entrance to their small, hillside town.

The clothes had been pulled from the muddy wreckage of a collapsed tailings dam just kilometres away, which had unleashed a tidal wave of industrial sludge that killed more than 270 of the town’s residents and employees of the dam.

The mining cataclysm early last year was Brazil’s worst — but it was not the first. Three years earlier, another waste dam at the nearby Mariana township in the state of Minas Gerais, also ruptured and collapsed, claiming 19 lives and causing widespread environmental damage.

Almost exactly five years on from that accident, waste from the Mariana mine is still being detected in Brazil’s rivers and along its coastline.

The disasters have been pivotal moments for Brazil’s mining industry, which under massive public pressure has been forced quickly to adopt new safety standards and protocols. Legislation has been passed at a federal and state level banning the type of perilous “upstream” dams that collapsed in both Brumadinho and Mariana.

Investors, too, have played a key role, with a handful of players — including the Church of England Pensions Board — spearheading new global standards for the industry.

But within Brazil many challenges remain, including ensuring that disaster victims and their families receive proper compensation and making sure that new checks and balances function.

A less publicised side of Brazil’s mining industry — illegal gold extraction — is also now attracting growing international scrutiny. Deep in the Amazon rainforest, small-scale miners, known as garimpeiros, are increasing their activity to benefit from the soaring gold price during the coronavirus crisis.

This activity is responsible for a chunk of the growing deforestation in Brazil and has been closely linked to violence against tribal communities in the rainforest. Many believe that federal government enforcement is now necessary, although it does not appear to be forthcoming.

“Mining is a violent activity. It is an activity that makes impact, violent impact,” says Luiz Jardim Wanderley, a professor of geography at the Federal Fluminense University. “And Brazil is becoming more and more a mining country. Iron ore is one of our biggest commodities and gold and copper are growing too.”

At the heart of the industry is the Rio de Janeiro-headquartered Vale — the world’s largest iron ore company — which operated the dam in Brumadinho and jointly ran the dam in Mariana with mining group BHP.

Almost two years after the Brumadinho collapse curtailed operations,the company has again begun to increase production of iron ore, which is used to make steel. Chief executive Eduardo Bartolomeo recently said he expects Vale to be producing 400m tonnes a year by the end of 2022. Before the disaster, the company produced 385m tonnes.

The group’s net profit, meanwhile, soared 75 per cent year on year in the last quarter to $2.9bn.

Executives insist, however, that safety — and not profit — is the company’s priority.

“Safety has become an obsession. We experienced the most difficult moment in our history, which has been a catalyst for changes,” says Luiz Eduardo Osorio, director of sustainability, communication and institutional relations.

The company says it is abiding by federal laws to decommission its remaining “upstream” tailings dams within the next three to five years and that it has signed up to a UN-backed industry standard on managing the waste from its operations.

Adam Matthews, director of ethics and engagement at the Church of England Pensions Board, which divested its Vale shares after the disaster last year, says: “I do see change at Vale, so it would be wrong to say otherwise. They are obviously trying to address the legacy of tailings and across the sector this is a continuing issue. The whole disaster has also been a wake-up call for investors.”

He adds, however, that this is still not sufficient for the board to reinvest in Vale. “We talk a lot to the communities affected by the disasters in Brazil and we do feel a significant disconnect between what the company says and what we hear from the communities [in terms of support offered to victims],” he says.

Last month families of the victims of Brumadinho accused Vale and the state government of negotiating reparations in secret — a claim both the company and the government of Minas Gerais deny.

Alberto Sayão, a professor of geotechnical engineering at the Catholic University of Rio de Janeiro, says that although “upstream” dams have been banned, the industry still needs to ensure better checks and balances, including with third-party safety inspectors.

He points out that auditors had deemed the Brumadinho dam safe only months before it failed.

“The problem is the inspectors cannot guarantee that their recommendations will be followed,” Prof Sayão says. “Their reports should be handed to the chief executive of the mining company, not to a middle manager, and the CEO should sign the report saying he is aware. Then he will be subject to responsibility.”

For Daniel Sasson, a mining analyst at investment bank Itaú BBA, the disasters will weigh on the industry’s image for some time — a notion accepted by Vale’s Mr Osorio, who acknowledges that the company has a “long way to go” to rebuild its reputation.

Thousands of kilometres away, however, far from Vale’s operations in Minas Gerais, a different kind of mining — small-scale and mostly illegal — is having a devastating effect on the Amazon.

In the past 18 months, large numbers of garimpeiros have surged into protected areas of the rainforest, in the hope of profiting from the sharp rise in gold prices over that period. Many bring heavy equipment to raze the trees and excavate the ground, and process the gold using mercury — a toxic metal that seeps into the water and atmosphere and has been linked to a spate of illnesses in the rainforest’s indigenous communities.

These tribes — particularly the Munduruku and Yanomami — have also found their traditional lands under threat from the miners, who can be violent and are sometimes linked to organised crime. Murders are common, say federal police.

Last year, forest equivalent in size to 10,000 football pitches was razed by illegal gold miners alone, according to environmental protection group Ibama. Much of the gold extracted was laundered into Brazil’s legitimate supply of the precious metal through lightly regulated purchase shops in the rainforest.

The surging illegal activity has triggered a string of police raids in recent weeks, which often involve military hardware including helicopters and explosives.

“In the past few months, with the higher price of gold, we’ve seen greater demand and more illegal miners,” says Debora Toci Puccini, director of the National Mining Agency.

“It has become a situation for the police. We don’t like to have to deal with it this way, but we have no choice.”