The British oil trader Trafigura has offered to pay out in a historic damages claim from 31,000 Africans injured by the dumping of toxic waste in one of the worst pollution disasters in recent history, the Guardian can reveal.

The compensation deal for the victims of toxic oil waste dumping in west Africa – likely to be confirmed imminently – means the full extent of attempts to cover up what really happened can be spelled out for the first time.

The truth is laid bare in Trafigura's hitherto secret documents, published by the Guardian today.

The company's internal emails show the true nature of the toxic waste dumped around Abidjan, the capital of Ivory Coast. Trafigura had publicly claimed the waste was harmless.

The exposure of the company files has contributed to Trafigura's climbdown after three years of bitterly contested legal battles. We are publishing them online today.

Martyn Day is a senior partner at the British law firm Leigh Day, which has brought one of the biggest group actions in legal history, seeking damages of £100m. He said today in Abidjan, where he has been negotiating the settlement: "The claimants are very pleased."

He was in the process of putting a global deal to the victims, he said. "The sum being discussed is based on the range of short-term symptoms claimed by our clients."

Thousands of west Africans besieged local hospitals, and a number died, in 2006 after the dumping of hundreds of tons of highly toxic oil waste around Abidjan.

Official local autopsy reports on 12 alleged victims showed fatal levels of the poisonous gas hydrogen sulphide, one of the waste's lethal byproducts.

The traders have been publicly insisting for three years that their waste was routine and harmless. They claim it was "absolutely not dangerous".

They have until now denied the compensation claims, and their lawyers repeatedly threatened anyone worldwide who sought to contradict their version. They launched a libel case against BBC Newsnight, forced a "correction" from the Times, demanded the Guardian deleted articles, and yesterday tried to gag journalists in the Netherlands and Norway with legal threats.

But dozens of damning internal Trafigura emails have now come to light. They reveal how London-based company employers were told in advance that their planned chemical operation, a cheap and dirty process called "caustic washing", generated such dangerous wastes it was widely outlawed.

Claude Dauphin, the managing director, was told by the London manager, Naeem Ahmed, on 28 December 2005: "Caustic washes are banned by most countries due to the hazardous nature of the waste (mercaptans, phenols, smell) … there are not many facilities remaining in the market. There is a company in Rotterdam that burns such waste in a high stack chimney and charges are approximately $200/kg."

An email from Ahmed the previous day to the head of gasoline trading spelled out: "US/Singapore and European terminals no longer allow the use of caustic soda washes since local environmental agencies do not allow disposal of the toxic caustic after treatment."

Transport of such toxic waste across EU borders was outlawed, he told his bosses. It was illegal to dump it on any EU landfill.

The London-based traders pressed on regardless, the documents reveal. They hoped to make profits of $7m a time by buying up what they called "bloody cheap" cargoes of sulphur-contaminated Mexican gasoline.

They decided to try and process the fuel on board a tanker anchored offshore, creating toxic waste they called "slops".

One trader wrote, on 10 March 2006: "I don't know how we dispose of the slops and I don't imply we would dump them, but for sure, there must be some way to pay someone to take them."

The resulting black, stinking, slurry was eventually dumped around landfills in Abidjan, after Trafigura paid an unqualified local man to take it away in tanker trucks at a cheap rate.

Trafigura's libel lawyers, Carter-Ruck, recently demanded the Guardian deleted published articles, saying it was "gravely defamatory" and "untrue" to say Trafigura's waste had been dumped cheaply and could have caused deaths and serious injuries. Both the Dutch paper Volkskrant and Norwegian TV said they were yesterday also threatened with gagging actions.

Trafigura launched a libel action against BBC Newsnight, complaining Trafigura had been wrongly accused of causing deaths, disfigurement and miscarriages, and had "suffered serious damage to their reputation".

The BBC filed a fighting defence this week, accusing Trafigura of knowing its chemicals were "highly toxic, potentially lethal and posed a serious risk to public health". The BBC also alleges a cover-up, saying Trafigura's denials "lack credibility and candour".

Newsnight plans to transmit another programme on the subject on BBC2 tonight.

The UN human rights special rapporteur Professor Okechukwu Ibeanu criticised Trafigura for potentially "stifling independent reporting and public criticism" in a report the oil traders tried and failed to prevent being published in Geneva this week.

The report said Ibeanu "views with great concern reports that the company has filed or threatened to file lawsuits against various civil society and media institutions that have reported … in a critical manner".

He wrote: "According to official estimates, there were 15 deaths, 69 persons hospitalised and more than 108,000 medical consultations … there seems to be strong prima facie evidence that the reported deaths and adverse health consequences are related to the dumping."

The report is written in cautious terms, but Trafigura's lobbyists, Bell Pottinger, responded by claiming to be "appalled", saying it was "premature", "inaccurate", "potentially damaging", "poorly researched", and "deeply flawed".

Yesterday Greenpeace, which has been investigating the issue, along with Amnesty, launched a legal action in Amsterdam calling for the oil firm to be prosecuted there for homicide or grievous bodily harm. It said: "This intentional pollution … has caused many people to suffer serious injuries and has even led to death."

Trafigura said it "utterly rejected" claims of a cover-up. "Every statement that has been made … has been made in good faith."

The traders said the autopsy reports were unreliable, and that hydrogen sulphide in the waste was only there in "potential" form. It has never actually been released. They said the emails contained "crude and distasteful" language, but had been taken "out of context" and should "not be taken literally".

They repeated denials that the slops could have caused death or serious injury, and were highly toxic. They denied lying about the composition of the slops.

Trafigura says it is the world's third-biggest private oil trader, and declared a $440m profit last year. Its 200 traders are reported to receive annual bonuses of up to $1m each.