When he wasn’t aboard his yacht, Farid Bedjaoui held court in the Bulgari Hotel in Milan, a renovated 18th-century palace nestled between the botanical gardens and the La Scala theater. Over five years, Bedjaoui’s hotel tab there exceeded $100,000.

In the plush rooms and the granite-lined lobby, Bedjaoui met with Algerian government officials and executives from Saipem, the Italian energy giant. Their agenda, according to witnesses later interviewed by Italian prosecutors: arranging some $275 million in bribes to help the energy company win more than $10 billion in contracts to build oil and gas pipelines from the North African desert to the shores of the Mediterranean.

To shift the bribe money between countries, Bedjaoui used a cluster of offshore companies that helped him shield the transactions from scrutiny, Italian prosecutors claim. Twelve of the 17 shell companies linked to Bedjaoui were created by Mossack Fonseca, the Panama-based law firm that is at the center of the Panama Papers scandal, a review of the law firm’s internal records by the International Consortium of Investigative Journalists and other media partners has found.

Italian investigators described one of those companies, Minkle Consultants S.A., as a “crossroads of illicit financial flows” that channeled millions of dollars from subcontractors to an array of recipients whose identities are still being untangled. Prosecutors allege Bedjaoui used one company set up through the law firm to funnel as much as $15 million to associates and family members of Algeria’s then-energy minister.

The cross-border bribery scandal is one of dozens of cases in Africa in which companies created or administered by Mossack Fonseca have played a role in oil, gas and mining deals that have spawned public allegations of tax dodging, corruption, environmental destruction or other misconduct. In all, ICIJ’s review identified 37 companies within the Panama Papers that have been named in court actions or government investigations involving natural resources in Africa.

Ventures that drill or dig for oil, gas, diamonds, gold and other resources have long been dogged by evidence that contracts are often secured through bribery and other corrupt tactics that benefit a few and harm average citizens. Suspect mining and energy deals are usually organized through secretive companies and hard-to-trace bank accounts, corruption experts say.

“Companies may be given access to lucrative extractive projects because their owners are politically connected, or because their owners are willing to engage in questionable deals aimed at generating quick profits for a few rather than benefits for wider society,” Fredrik Reinfeldt, former prime minister of Sweden and now head of the Extractive Industries Transparency Initiative, told ICIJ.

He said the use of anonymous companies makes it harder to prevent money laundering and corruption because it allows wrongdoers to “hide behind a chain of companies often registered in multiple jurisdictions.”

ICIJ’s review of Mossack Fonseca’s internal records shows that the Panama-based law firm is a major provider of secrecy to companies involved in extractive industries. The firm’s internal files include more than 1,400 companies whose names refer to mining, minerals, oil, petrol or gas. Other less explicitly named companies – including the 12 companies allegedly used by Bedjaoui in the Algerian energy deal – also played roles in the extractive sector, the files show.

Mossack Fonseca’s files reveal offshore companies that were established to own, hold or do business with petroleum, natural gas and mining operations in 44 of Africa’s 54 countries. Many of them are controlled by politicians, their family members and business associates. Often, the oil, gas, gold and diamonds formed beneath the earth’s surface over millions – even billions – of years are traded by shadow companies that have existed for months.

Companies created and assisted by Mossack Fonseca include at least 27 subsidiaries of one of the world’s biggest gold producers, the mining behemoth AngloGold Ashanti and its predecessor. AngloGold told ICIJ it complies with relevant tax laws and that its offshore companies held investments and allowed it to “mitigate ‘double taxation.’”

Mossack Fonseca declined to answer detailed questions for this story. It told ICIJ that “our firm, like many firms, provides worldwide registered agent services for our professional clients (e.g., lawyers, banks, and trusts) who are intermediaries. As a registered agent we merely help incorporate companies, and before we agree to work with a client in any way, we conduct a thorough due-diligence process, one that in every case meets and quite often exceeds all relevant local rules, regulations and standards to which we and others are bound.”

The law firm added: “Filing legal paperwork to help incorporate a company is a very different thing from establishing a business link with or directing in any way the companies so formed. We only incorporate companies, which just about everyone acknowledges is important, and something that’s critical in ensuring the global economy functions efficiently.”

Saipem, the Italian energy company, told ICIJ it is “fully cooperating” with prosecutors and it has “implemented significant managerial and administrative restructuring measures.” External consultants reviewed the company’s books, Saipem said, and “found no evidence of payments to Algerian public officials through the brokerage contracts or subcontracts examined.” In February 2016, an Algerian court found a Saipem subsidiary guilty of fraud, money laundering and corruption in obtaining contracts from Algeria’s national oil company, Sonatrach.

Criminal charges have been filed against Bedjaoui by Italian authorities. Prosecutors allege that he inflated contracts for the benefit of Algerian officials, adding a standard cut for himself, which earned him the nickname “Mr. 3 Percent” after police found the ratio scrawled on Bulgari Hotel stationery during a raid.

Bedjaoui, the nephew of a former Algerian foreign minister, is currently living in a Beverly Hills-inspired gated community in Dubai. He did not reply to repeated requests from ICIJ for comment.

In previous responses to the media, his lawyers have denied he was involved in any wrongdoing. They insist that, as a thirty-something management graduate, he could never have wielded enough influence among Algeria’s political, military and business elites to coordinate a $275-million-dollar bribery scheme.

The Saipem-Sonatrach bribery case fits a pattern in Africa and other developing regions, where countries with the richest natural endowments often lose the most money offshore.

Between 2004 and 2013, Algeria, home to the second-largest oil reserves in Africa, lost an average of $1.5 billion annually through tax avoidance, bribery, corruption and criminality, the research group Global Financial Integrity estimates. Across the continent, the United Nations estimates at least $50 billion each year goes unaccounted for due to illicit money flows.

Oil-rich Nigeria, for example, routinely tops the list of African nations from which billions of dollars are siphoned each year. Mossack Fonseca’s files show the law firm’s former customers included three oil ministers, senior national oil company employees and two former state governors later convicted of laundering oil-tainted wealth.

British and U.S. investigators said Diepreye Alamieyeseigha, governor of Nigeria’s oil-rich Bayelsa State from 1999 to 2005, used money skimmed from public funds, including government oil contracts, to buy a home in Rockville, Maryland, and four homes in London held by an offshore company set up through Mossack Fonseca.

Alamieyeseigha was arrested on U.K. money laundering charges during a visit to London in 2005, but later reportedly slipped out of the country dressed as a woman. He returned to Nigeria, where he was impeached and removed as governor. He served a short prison term but in 2013 was pardoned by President Goodluck Jonathan. Alamieyeseigha died in 2015.

Nigeria’s current president, Muhammadu Buhari, has called on world leaders to do more to help African nations fight money laundering and shine light on offshore hideaways.

“Every dollar siphoned through dirty deals and corruption to offshore tax havens makes the livelihood and survival of the average African more precarious,” Buhari said in a speech delivered at an anti-corruption summit in London one month after the release of Panama Papers.

Ensuring anonymity

In 2005, Algeria announced that its enormous gas reserves were open for business. At stake was the opportunity to help build the first direct route from largely untapped gas reserves in the heart of the Algerian desert to Europe’s energy-hungry market. It was an important move for Algeria, a country with an unsteady economy that relies heavily on oil and gas revenue.

Executives from China, France, Britain, Spain and Japan flew into Algiers to submit bids.

Saipem emerged as one of the big winners. Between 2006 and 2009, the Italian company – which bills itself as “one of the world leaders” in drilling and pipelines – won seven contracts to lay hundreds of kilometers of pipelines and canals and to build treatment plants capable of processing 100,000 barrels of oil a day.

The flurry of activity in Algeria was matched by the expansion of Bedjaoui’s offshore network.

Bedjaoui, who is French, Canadian and Algerian, earned his business management degree in Montreal, then worked in his family’s coffee-importing venture before landing at a Dubai-based oil and gas investment firm with a valuable North African client list.

By 2002, Bedjaoui had used Mossack Fonseca to open a Swiss bank account for his company Rayan Asset Management. A Swiss tax lawyer then went on a buying spree on the Algerian’s behalf, ordering pre-existing “shelf” companies in Panama and the British Virgin Islands.

Mossack Fonseca’s background checks on Bedjaoui in 2008 and 2009 revealed nothing suspicious, the law firm’s internal files show. Bedjaoui didn’t make it easy; he used his Canadian passport to open some bank accounts and his Algerian ID to open others.

For 11 years, Mossack Fonseca worked for Bedjaoui and half a dozen of his family members, friends and associates. Into this world Bedjaoui brought his wife and brother-in-law, relatives of Algeria’s energy and water ministers, the CEO of Algeria’s government-controlled oil and gas company and Saipem’s in-country Algeria manager. Italian prosecutors later said the close-knit web of kinship led them to suspect that many of the companies created though Mossack Fonseca were used “for corrupt payments or for improper personal enrichment.”

It was, according to investigators, a network of graft and slush funds organized in hotel lobbies and coffee bars in Paris and Milan and on yachts in the Mediterranean. Outside the Bulgari Hotel, attendees exchanged secret cell phone numbers to keep in touch; it wasn’t to “exchange Christmas wishes”, an Italian judge wryly suggested years later.

In setting up his offshore companies, prosecutors allege, Bedjaoui chose countries with secrecy rules “that ensure the anonymity of the shareholders” and further obscured the paper trail by scattering money into 16 bank accounts in Dubai, Algeria, Singapore, London, Hong Kong, Switzerland and Lebanon.

In 2013, Khelil, a graduate of Ohio State who lived for many years in Maryland, was briefly placed on Interpol’s wanted list. Khelil returned to Algeria after authorities withdrew corruption charges they had leveled against him.

Reached by telephone by ICIJ, Khelil said he did not have the time to speak and hung up.

Official suspicions about Bedjaoui’s role in Algerian energy deals first became public in February 2013. Months later, Canadian police seized Bedjaoui’s assets in Montreal and French authorities raided Bedjaoui’s apartment on a tree-lined avenue in Paris. French police later reportedly seized a 43-meter yacht and paintings by Warhol, Miró and Dali.

The investigations into Bedjaoui’s activities and assets made headlines in Algeria, Canada and Italy. But Mossack Fonseca remained unaware of its customer’s legal issues for much of 2013.

Heather Lowe, an attorney with Global Financial Integrity, an anti-corruption group based in Washington, D.C., said that offshore middlemen have economic incentives “not to know what the companies they are forming are going to be used for. If they know too much, they might have to turn away business. … As a result, there’s often no gatekeeper to prevent illicit money from entering the financial system.”

‘Mandatory high-risk cluster’

International standards and laws in many countries generally require that financial middlemen like Mossack Fonseca screen their clients to make sure they’re not involved in wrongdoing. They are also required to take extra steps to check up on clients who are “politically exposed persons” – government officials or their family members or associates.

In its written procedures, Mossack Fonseca acknowledges that transactions involving industries linked to oil, gas and mining carry high risks for money laundering and other crimes.

The law firm classifies the mining industry as a “mandatory high-risk cluster” and requires workers to do extra background searches on anyone involved in digging, drilling, trading and exporting natural resources.

But documents within the Panama Papers show Mossack Fonseca employees often fail to conduct adequate checks on clients involved in extractive industries and in some cases offer services that make it difficult for government authorities to identify the players behind offshore companies and natural resources deals.

In 2014, Mossack Fonseca offered to provide a stand-in shareholder to shield the real owner of a phosphate mine who said he wanted to “stop the chain” of “additional enquiry” into the company’s ownership by Tanzanian authorities. In 2013, a Mossack Fonseca employee asked colleagues for a “quick answer” to help Elísio Figueiredo, a former Angolan ambassador to the United Nations, bank $26 million from the sale of his shares in a mining company. Figuerido’s nationality and high profile might be problematic, one colleague noted, but Mossack Fonseca kept alive the possibility of sending an employee to visit a bank in Hong Kong and open an account in his place. It’s unclear from the records whether that plan was carried out.

Figueiredo could not be reached for comment.

In June 2011, a Mossack Fonseca employee wrote to her superiors to report a problem. Acting under pressure from an English law firm, the employee noted, Mossack Fonseca had made “an exception” to its anti-money-laundering practices.

In ​2010, ​the employee explained, ​Mossack Fonseca created two companies and offered its own employees as stand-in shareholders without first learning the identity of the true owner. “Within one month,” the employee wrote, the firm learned that the companies’ owner was “a Mr. Dan Gertler who is an Israeli diamond dealer under investigation for bribery in the Congo and involved in the ‘blood diamond’ business. His name is plastered all over the internet.”

Some of the companies Mossack Fonseca had incorporated for Gertler were under investigation in the British Virgin Islands, the employee added.

Despite these issues, Mossack Fonseca did not immediately resign as the British Virgin Islands agent for Gertler’s companies, the employee wrote, but retained him as a customer “under the auspices of trying to obtain as much due diligence as possible in order to look like we had done something in this area and then resigning afterwards.”

Amid concerns that Panamanian authorities would soon investigate, Mossack Fonseca ended its relationship with Gertler’s companies.

A representative for Gertler told ICIJ that he is not aware of any investigation by Panamanian or BVI authorities into his companies in the DRC. “Offshore companies have never been used to hide” ownership information, the representative said.

The representative declined to comment “on what would appear to be baseless and defamatory allegations made by an employee of a firm, which we didn’t ultimately do business with, in a private email.” Gertler’s companies have invested approximately $100 million in the DRC, the representative said.

In a written response to ICIJ, Mossack Fonseca said it follows “both the letter and spirit of the law. Because we do, we have not once in nearly 40 years of operation been charged with criminal wrongdoing. We’re proud of the work we do, notwithstanding recent and willful attempts by some to mischaracterize it.”

‘Modus operandi’

Mossack Fonseca’s due diligence methods appear to have fallen short in the case of Bedjaoui, the wheeler-dealer at the center of the Algerian bribery affair.

The law firm’s internal emails suggest that Mossack Fonseca did not become aware of Bedjaoui’s involvement in the Saipem-Sonatrach scandal until September 2013. By chance, an internet search relating to another client turned up information that Bedjaoui was under investigation in connection with the case. One of the law firm’s employees reported that Bedjaoui was “suspected of being one of the main protagonists of this scandal.”

Mossack Fonseca told British Virgin Islands officials that it could not provide contact information for its own employees who had served as place-holder directors for some of the companies suspected of being involved in the alleged bribery scheme. Rosemarie Flax, Mossack Fonseca’s managing director in the BVI, acknowledged in an internal email that not having “this basic information on employees is totally embarrassing” and put the law firm at risk of a fine.

Mossack Fonseca reported Bedjaoui and his network to BVI authorities in 2013, but it continued processing paperwork for another one of his companies, Rayan Asset Management, until at least November 2015.

U.S. authorities are reportedly examining three New York homes worth more than $50 million bought by Bedjaoui, including one Central Park-Fifth Avenue condominium acquired for $28.5 million. The U.S. Department of Justice provided Italian investigators records showing that a Delaware company linked to the global asset hunt transferred $26 million from the Bank of New York Mellon to JP Morgan Chase to help complete the purchase of the condominium.

“The investment of the proceeds of bribery in real estate in the United States is a typical modus operandi of the criminal group attributable to Bedjaoui,” Milan’s public prosecutors said in a letter to U.S. authorities in March 2015. The prosecutors sought U.S. help to obtain ownership records and information on the origin of the funds used to buy properties in Rockville and Potomac, Maryland, that prosecutors suspect were purchased with bribe-tainted money.

In February, a court in Algeria fined and jailed 19 people and companies in the first phase of prosecutions tied to the Saipem-Sonatrach scandal. Across the Mediterranean Sea, an Italian court handed down a prison sentence to a former Saipem executive, Tullio Orsi, who accepted a plea bargain to avoid trial.

Orsi told prosecutors he met for discussions at least three times at Milan’s Hotel Bulgari, including one with Bedjaoui.

On another occasion, while relaxing on a boat moored off the Spanish coast, Orsi testified, Bedjaoui offered him $10 million.

Bedjaoui, Orsi says, told him that “there were others like me that he helped financially and he had pleasure doing it.”

Contributors to this story: Leo Sisti and Lyas Hallas