One of the world's largest firms loaned a businessman previously accused of corruption $45m and asked him to negotiate mining rights in the Democratic Republic of Congo, the Paradise Papers reveal.
Anglo-Swiss company Glencore made the loan available to Israeli billionaire Dan Gertler, a notorious middle man with a close relationship with senior figures in the DR Congo government, in 2009.
Mr Gertler was asked to negotiate a new deal for a mining company in which Glencore had a significant stake, which campaigners say cost DR Congo hundreds of millions of dollars.
He and Glencore deny any wrongdoing.
Glencore agreed to pay Dan Gertler $534m (£407m) to buy him out of their shared mining interests in DR Congo in February this year.
The new details came to light in the Paradise Papers, a leak of more than 13.4 million documents, many from within Appleby, one of the world's leading offshore law firms.
DR Congo has been mired in violence and corruption for decades, leaving more than half of its population living below the poverty line.
But the country's vast mineral resources are worth hundreds of millions of dollars a year for those that can access them.
This includes Glencore, a huge Anglo-Swiss mining and commodity trading company.
By some measures it is the 16th largest company on the planet.
For many years Glencore has been involved in mining in DR Congo, in particular the production of copper.
The company says it has invested $50bn there. Ten years ago it had an 8.52% stake in a company called Katanga which had the rights to mine copper in the south of the country.
In June 2008 Katanga's board, which contained a senior Glencore figure, received some bad news.
The DRC government under President Joseph Kabila wanted to renegotiate the terms of its mining licences. Glencore had already invested $150m in Katanga but this could have been wasted if it was unable to mine.
The state-owned mining company Gécamines wanted $585m (£409m) in an "access premium" to allow the exploitation of copper and cobalt at the mine.
The previous agreement had been for $135m (£94.5m).
Documents contained within the Paradise Papers show Katanga's board felt the demands of the DRC authorities were "quite unacceptable". For the first time, it is possible to see that the directors decided to call for the help of an Israeli businessman called Dan Gertler.
Source document: Katanga board minutes - June 2008
"Dan Gertler, who had a substantial indirect interest in the company, should be given a mandate from the board to negotiate with the DRC authorities," Katanga's board minutes from June 2008 show.
"The board... should approach Mr Gertler to see whether he was prepared to act in this way."
Mr Gertler was asked to negotiate an agreement on Katanga's behalf.
At around the same time, Glencore agreed to lend a company in the British Virgin Islands called Lora Enterprise $45m (£31.5m).
Lora Enterprises was controlled by Mr Gertler's family.
Glencore then loaned Katanga $265m (£185m). This was later converted into shares in the company, allowing Glencore to become its biggest shareholder. The loan to Lora Enterprises allowed Dan Gertler to maintain his stake in the mine. Although Mr Gertler says he did not benefit in any way from the loan.
Katanga announced the larger of the loans to the Toronto Stock Exchange in February 2009, but the details around it were sparse until now.
The terms of the loan to Mr Gertler's company show that if he failed to deliver a new agreement for the rights within three months, Glencore would have been entitled to demand immediate repayment of the loan.
The Paradise Papers documents suggest Mr Gertler was quickly successful. Gécamines reduced the access premiums it was asking for from $585m to $140m, which was close to the original agreement, saving Katanga $445m.
Pete Jones from anti-corruption campaigners Global Witness said deals similar to the one Glencore was able to strike have had serious consequences for DR Congo.
"For a country that dependent on it natural resource wealth, deals like this which just suck money out of the economy have hugely negative consequences for DR Congo."
Mr Gertler disputes that it was a poor deal for the DRC and says "Gécamines benefitted significantly from the new JVA including Katanga's release of copper and cobalt reserves to Gécamines worth $825m."
Glencore told the BBC the $45m loan to Lora Enterprises was made "on commercial terms and was negotiated at arm's length".
It also said it was repaid in full by 2010. Lawyers for Mr Gertler said it's not unusual for a lender in a mining deal to demand repayment of a loan if a joint venture fails. They went on to say that "neither Lora Enterprises nor Mr Gertler nor any company or person related to them received the loan funds directly".
Mr Gertler's notoriety in DR Congo goes back almost two decades. In 2001 the UN produced a report that accused him of exchanging weapons and military training in part of a deal to secure a monopoly on diamond mining rights.
In 2013, a report by the Africa Progress Panel, led by former UN Secretary General Kofi Annan, suggested Dan Gertler's companies had won mining rights in DR Congo at well below their true value. Lawyers for the Israeli businessman deny the allegations made in the 2001 and 2013 reports.
Last year, hedge fund Och-Ziff agreed to pay $412m to settle a case brought by US authorities accusing it of paying bribes in several African countries. Prosecutors described, but did not name, an Israeli businessman who they claimed paid "together with others, more than $100m in bribes to obtain special access to, and preferential prices for, opportunities in Congo's mining sector".
Dan Gertler denies that he did this. Perhaps most significantly, Mr Gertler was also known to be a close friend of a man called Katumba Mwanke, a key advisor to President Kabila before dying in 2012.
Daniel Balint-Kurti from the NGO Global Witness, which has been investigating the relationship between Dan Gertler and Glencore for several years, says the company should have been wary of working with the businessman.
"By hiring someone close to the Congolese president and pumping him with cash and mandating him as their man in negotiations they were running an extremely high risk," he said.
Dan Gertler's lawyers told the BBC that "[He] is a respectable businessman who contributes the vast majority of his wealth and time to the needy."
The papers are a huge batch of leaked documents mostly from offshore law firm Appleby, along with corporate registries in 19 tax jurisdictions, which reveal the financial dealings of politicians, celebrities, corporate giants and business leaders.
The 13.4 million records were passed to German newspaper Sueddeutsche Zeitung and then shared with the International Consortium of Investigative Journalists (ICIJ). Panorama has led research for the BBC as part of a global investigation involving nearly 100 other media organisations, including the Guardian , in 67 countries. The BBC does not know the identity of the source.
Paradise Papers: Full coverage ; follow reaction on Twitter using #ParadisePapers; in the BBC News app, follow the tag "Paradise Papers"
Watch Panorama on the BBC iPlayer (UK viewers only)