Most people remember that the Arab Spring started with a guy who lit himself on fire. What they don’t remember is that he did it as a protest against corruption: Mohamed Bouazizi, a Tunisian fruit vendor, decided he'd been shaken down by police officers one too many times.

Bouazizi's death set in motion the biggest political upheaval of the 21st century. The Arab Spring was “mostly about corruption,” said FBI Special Agent George McEachern, one of the leading investigators of global graft. “Corruption leads to failed states, which leads to terrorism."

That's what makes the corruption revealed in a new trove of confidential emails from a mysterious Monaco-based company called Unaoil so significant.

On Wednesday, The Huffington Post and its Australian partner, Fairfax Media -- led by reporters Richard Baker and Nick McKenzie -- published the results of a months-long investigation of Unaoil, an obscure firm that helps big multinational corporations win contracts in areas of the world where corruption is common.

Hundreds of major international corporations -- including Halliburton, its former subsidiary KBR, Rolls-Royce and Samsung -- counted on Unaoil to secure lucrative contracts in Iraq, Kazakhstan, Libya, Syria, Tunisia, and other countries in Africa, the Middle East, and the former Soviet Union, tens of thousands of internal emails and documents reveal. It's common for large multinational corporations to partner with smaller firms with local expertise to win contracts. But in many cases, Unaoil wasn't winning contracts because of its expertise -- it was winning them by paying millions of dollars in bribes to corrupt officials.

[Confused? Read our explainer on the Unaoil scandal.]

Most of the companies that worked with Unaoil denied involvement in corrupt activities. "KBR is committed to conducting its business honestly, with integrity, and in compliance with all applicable laws," a spokeswoman said. "We do not tolerate illegal or unethical practices by our employees or others working on behalf of the Company." Samsung "has always complied with the laws and regulations when performing business," the company said. Rolls-Royce, which sent a Unaoil subsidiary a letter in 2013 suspending the relationship, citing corruption allegations, said that it is "co-operating with the authorities and do not comment on ongoing investigations. We have made it clear that Rolls-Royce will not tolerate business misconduct of any kind."

By aiding the corruption of already-distrusted regimes and accelerating the flow of money and resources out of poor countries, Unaoil and its partners were risking far more than fines and criminal penalties. They were creating political instability, turning citizens against their governments, and fueling the rage that would erupt during the Arab Spring -- and be exploited by terrorist groups like al Qaeda and the Islamic State.

Companies and individuals pay at least $1 trillion in bribes to public sector officials annually, according to an estimate by Daniel Kaufman, a governance expert with the World Bank Institute.

The Unaoil emails don't show corrupt third-world kleptocracies shaking down helpless Western corporations. They show the opposite: Unaoil, working for Western companies, is seen slowly corrupting foreign officials, starting off with small gifts and shopping sprees and eventually hooking them on major graft.

"There is always somebody who pays," the billionaire hedge fund magnate George Soros has said, "and international business is generally the main source of corruption." That's part of the story that terrorists have long told local populations to justify jihadist insurgency. In many of the cases uncovered here, it happens to be true.

* * * * *

Based in Monaco but incorporated in the British Virgin Islands, Unaoil says it provides "industrial solutions to the energy sector in the Middle East, Central Asia and Africa." It was founded in 1991 by Ata Ahsani, an Iranian-born millionaire who left the country after the 1979 revolution. The company's work, Ahsani told HuffPost and Fairfax Media, is "very basic. What we do is integrate Western technology with local capability." Two of Ata Ahsani's sons, Cyrus and Saman, are deeply involved in the company's day-to-day operations.

Here's how Unaoil's schemes often worked. During the time frame covered by the documents -- most of which date from the end of 2003 to the middle of 2011 -- Unaoil's practice was to ask its partners for a percentage of the revenue from any contracts Unaoil helped them win. Once Unaoil made sure it had a stake in its client's business, it would sometimes use a portion of its cut to bribe government officials -- and keep the rest for itself.

In one 2005 email to his colleagues, Basil Al Jarah, a Unaoil executive, described a September meeting in Paris with Laurent Poidevin, then a sales and marketing VP for FMC Technologies, an American equipment firm. Al Jarah bragged that he had convinced FMC to hire Unaoil to obtain a contract to install between four and six new loading arms at a major port in Kuwait. Here's an excerpt:

I secured a commitment of 10% to be made in writing by close of business today. I requested FMC provide three letters as follows: 1% To [another company] for making the introduction. 7% To Unaoil which we will show to the big cheese in Kuwait. 2% To Unaoil which can be split internally. Mr. Laurent had no problems with that as long as it is not made out in individual names. He will run this by his CEO when he gets to the office and send the commitment email at once to be followed by a consultancey [sic] contract which both parties are expected to sign…. ...[Another intermediary] is handling the big cheese in Kuwait and to decide what portion of the 7% should go to that man.

Poidevin is now the president and general manager of FMC, according to his LinkedIn profile. "FMC Technologies has a culture of accountability and compliance and competes on the strength of its technology, service, and execution excellence," an FMC spokeswoman said in an email. "Employees are expected to uphold our core value of integrity and are trained to report concerns. We thoroughly investigate all issues that are raised and take appropriate action. This is a long-standing commitment FMC Technologies has made everywhere we operate."

Did Unaoil bribe public officials? "The answer is absolutely no," Ata Ahsani said.

If it did -- and the emails suggest as much -- the companies that hired Unaoil could face criminal sanctions or enormous fines. In the U.S., a federal law, the Foreign Corrupt Practices Act, or FCPA, prohibits companies from working with any entity that they know -- or should know -- bribes foreign government officials. Even offering to pay a bribe is forbidden. Most rich countries, including Australia, Canada, and the U.K., have similar laws. And U.S. prosecutors can and do apply the U.S. law to foreign firms, especially ones that do business in the U.S or issue stocks on U.S. exchanges. Eight of the 10 largest FCPA settlements in history, all of them over $100 million, were with firms based outside of the U.S.

Not all of the companies that Unaoil worked with necessarily knew what it was doing. That may not matter: The FCPA allows for fines and criminal penalties for companies that fail to properly investigate whether their partners are paying bribes. It's what the law calls "deliberate ignorance" or "willful blindness," explained Andy Spalding, a law professor at the University of Richmond who runs a leading blog on the subject. "Historically what a lot of these companies would do is hire these intermediaries," he added. "The company might think it's protected by the statute because it doesn't know what the intermediary was doing. But if there are red flags and the company does not investigate, that can also [create] liability."

Red flags surrounded Unaoil. Just the fact that the company is based in a tiny tax haven like Monaco should have made its partners nervous, argued Richard Bistrong, the CEO of Frontline Anti-Bribery, a consultancy. "Right away just having an agent in Monaco is going to give you pause for due diligence," said Bistrong, who cooperated with an FBI bribery investigation, served 14 months in federal prison for an FCPA violation, and now advises companies on how to avoid following in his footsteps. Unaoil's business -- the energy industry -- is also "risky," Bistrong said. "It would warrant a very robust and in-country level of due diligence." Being incorporated in the British Virgin Islands is a "big" red flag, too, he said.

But some of Unaoil's partners were not particularly concerned. In one egregious example, Kelsey Kalinski, the president of a Canadian fracking firm called Canuck Completions, emailed his colleagues and a Unaoil employee, Foroohar Farzadnia, to ask about a deal in Libya. "What we are curious about is to what type of Baksheesh is needed to present to these men in order to get work started," Kalinski wrote, using a common slang term for improper payments. "I believe this is common practice in Libya, but we are not sure how to handle this. Is this something that needs to be done after work hours one on one? A added value amount to the ticket for them, or a flat fee a month, we are not sure. What are your thoughts on this?" (TMK Completions, which absorbed Canuck Completions several years ago -- and where Kalinski now works -- declined to comment or make him available for comment.)

A few emails later, Saman Ahsani followed up with an email to Farzadnia and several others. "I don't know what kevin [sic] means by bakhsheesh," Ahsani wrote. "May i remind everybody of our Group's code of conduct and zero tolerance of any facilitation activities. He needs a talking to."

Bribery is illegal for a litany of reasons, but one in particular -- the idea that corruption fuels political instability and strengthens the enemies of free-market democracies -- has underpinned U.S. anti-bribery efforts for decades. When the U.S. passed the FCPA in 1977, “the concern was that U.S. companies paying bribes overseas was going to weaken the position of the west in the Cold War," said Spalding, the Richmond law professor. Corruption, U.S. lawmakers realized, weakens Western-friendly governments and makes them easy targets for insurgencies.

Like their communist predecessors, jihadists have long recognized the power of anti-corruption narratives to help them win popular support. “Corruption is a tool that terrorism uses,” said Roger Cook, a corruption expert with the City of London Police. “It causes terrorism.”

Jihadists make the case that religious purity is not merely an end in itself, but a means to a righteous government. In 2004, Osama bin Laden, in a propaganda video sent to Al Jazeera, warned the Middle East that the Bush administration was occupying Iraq "with a new puppet to assist in the pilfering of Iraq's oil”; he loved to decry the "pride, arrogance, greed and misappropriation of wealth," of the Gulf states. Kim Barker, writing for the Chicago Tribune in 2008, noticed the phenomenon in Afghanistan. "Corruption is turning more people toward the fundamentalist Taliban, which is seen as clean in comparison," Barker reported from Kabul. "The Taliban may be remembered for its harsh rule, but it also is remembered for enforcing that harsh rule. No one took bribes."

Ayman al-Zawahri, who now heads al Qaeda, similarly decries corruption at every turn. "These corrupt and rotten regimes are the reason behind economic injustice and corruption, the political oppression, and social detachment," he said in 2009.

In Afghanistan, Iraq, Syria and Libya, jihadists focused much of their propaganda on the irredeemable corruption of Hamid Karzai, Nouri al-Maliki, Bashar Assad and Muammar Gaddafi. One of ISIS leader Abu Bakr al-Baghdadi's first orders of business after proclaiming himself caliph, in 2014, was to promise to return property that al-Maliki, then the Iraqi prime minister, had illegitimately appropriated. "It's part of their narrative, that it's an impure state, that democracy is synonymous with corruption," said a senior Iraqi government official who wasn't authorized to speak on the record. To prove it takes corruption seriously, ISIS has crucified several of its own fighters after alleging they took bribes.

Because insurgents thrive when Western-friendly governments become corrupt and weak, they are especially pleased when the U.S. and Western corporations undermine governance by enabling corruption. As Soros said, somebody has to pay the bribes. Corruption in Afghanistan and Iraq, for example, has only gotten worse since the U.S. invaded, bringing Western corporations and money with it. Between 2003 and 2015, Iraq fell from 113th on Transparency International's Corruption Perception Index to 161st. "We’ve learned our lesson kind of the hard way," said Keith Henderson, who evaluated Iraqi anti-corruption efforts for the State Department in 2008 and now teaches at American University's law school. "If you don’t do something to abate or address corruption in state institutions, one of the very probable outcomes is civil unrest and possible insurgency."

Reuters Smoke rises behind an Islamic State flag in Saadiya, Iraq.

In Afghanistan, "the sheer quantity of international aid flowing into the country since 2002 has created enormous incentives for graft," Aaron O'Connell, a military historian at the U.S. Naval Academy, wrote last year. Between 2005 and 2015, it fell from 117th on the corruption index to 166th, ahead of just North Korea and Somalia.

Sarah Chayes witnessed the damage that flood of Western money -- and the accompanying corruption -- did in Afghanistan. When U.S. forces entered Kabul to oust the Taliban, Chayes was a reporter, covering the invasion for National Public Radio. She decided to stay and help rebuild, eventually opening a cooperative that produced soaps and body oils. She was one of very few Americans over the last 15 years who lived and worked with the Afghan people rather than behind the razor wire.

After just a few months, Chayes noticed people she thought of as moderate, normal folks expressing sympathy for the Taliban. She soon realized what was happening: the corruption that had been rampant at all levels since the U.S. invasion was fueling anger and unrest.

Chayes later began working for the U.S. military in Afghanistan, waging an internal war to persuade policymakers to focus on corruption. The issue ultimately reached the desk of Secretary of State Hillary Clinton, who largely dismissed it in a 2010 memo that remains classified.

Westerners might perceive insurgencies in Muslim-majority countries as fundamentally about the role of Islam in society, Chayes says. But insurgents also take advantage of widespread discontent over how their countries are run. People fed up with corruption tend to look for leaders who are perceived to be incorruptible. "At the top of the list of reasons cited by prisoners for joining the Taliban was not ethnic bias, or disrespect of Islam, or concern that U.S. forces might stay in their country,” Chayes wrote in Thieves of State, her book on the threat corruption poses to global security. “At the top of the list was the perception that the Afghan government was irrevocably corrupt.” Afghans, she added, "hold Washington responsible for the Karzai government's behavior."

The role of Western companies in aiding corrupt foreign behavior has long been obscured. But the Unaoil emails make clear just how complicit some firms are in foreign corruption – and how eager others are to turn a blind eye towards it.

Consider the case of Dhia Jaffar al Mousawi, the man codenamed "Lighthouse" in the emails. When Unaoil started dealing with Dhia Jaffar, who currently serves as Iraq's deputy oil minister, he was still an official at the South Oil Company, Iraq's most important state-owned energy firm. "When Prime Minsters [sic] visit Basrah, he accompanies them first and holds private sessions with them," Al Jarah wrote of Dhia Jaffar in 2008. At the time, Al Jarah and Unaoil were focused on gradually plying him with small bribes.

The emails and documents contain dozens of examples of payments to government officials involving different Unaoil employees. But Al Jarah was consistently one of the company's least discreet correspondents. He described his efforts to woo Dhia Jaffar in an email:

We haven't done much for [Dhia Jaffar] really, but here is a list: 1) Took him clothes shopping on two occasions (around $1-2K each time) 2) Related sub agent got $30k for assistance with al Kassim order. 3) Gave his son a 2 week English course in Dubai. Arranged interviews to employ the son in Adnan's company, but the boy found alternative work. 4) For the past 8 months working on getting him a UAE residency visa, but without success. That's it.

"Lighthouse" paid Unaoil back, providing inside information and tipping the company off to potential customers. "In general discussion with Mr. Lighthouse this evening, it transpired that TPIC" -- Turkish Petroleum International Company -- "is close to winning an order of $325m for drilling 45 wells in south of Iraq," Al Jarah wrote in a August 2009 email to Ata and Cyrus Ahsani. "He says they applied openly and he is not aware of any special connection to an Iraqi entity pushing their bid forward. I immediately requested Lighthouse to hold processing anything until he hears from me. We need to move urgently to reach this company and give them the full works that Unaoil can make their life easier in the Ministry, SOC."

Until she retired in December, Debra LaPrevotte was one of the FBI's top special agents investigating global oil industry corruption. The Unaoil playbook to ease officials into corruption is familiar. "It's the modus operandi," she said. "Give them a rug, and then a car, and then a Rolex and then it escalated to, we can pay your children's tuition."

"The money they have to throw at things allows them to do things like, 'Let us send your family on a vacation. Let us get you tickets to World Cup soccer, to the Super Bowl,' to things you'd like to go to but maybe you couldn't afford," LaPrevotte added.

The Obama administration has belatedly acknowledged the idea that corruption is a national security threat. "Corruption is a radicalizer because it destroys faith in legitimate authority,” Secretary of State John Kerry said at the World Economic Forum in Davos earlier this year, singling out Iraq, Syria, Libya and Nigeria as examples. “It opens up a vacuum which allows the predators to move in. And no one knows that better than the violent extremist groups, who regularly use corruption as a recruitment tool."

Lukman Faily, Iraq's ambassador to the United States, says the government has learned its lesson. Informed of the allegations of corruption connected to Unaoil, Faily said Iraq's new prime minister, Haider al-Abadi, is chairing a new committee that will review all major contracts within the ministries. He also said the country has banned middlemen, at least for military contracts. In the defense sector alone, he claimed, cutting out the middlemen has saved roughly $2 billion.

Unaoil is still hard at work in Iraq. "We have recently become aware of some... claims that Unaoil has bribed its [International Oil Company] clients as well as [National Oil Company] clients and Government officials in order to win work," Saman Ahsani wrote in a 2015 memo to employees titled "Lies About Unaoil In Iraq." The timing, Ahsani added, "is not coincidental - as many of you know, we are close to securing some major new awards from IOCs. We will shortly be reporting other new wins outside Iraq as well."

In July, Unaoil declared victory. "Sulzer Rotating Equipment FZCO, a joint venture between Unaoil and Sulzer Pumps operating in North Rumaila, Iraq, has been awarded a three-year pump maintenance contract by Basra Gas Company," it bragged in a press release. The contract could be worth millions.

Akbar Ahmed, Richard Baker, Zach Carter, Blair Guild, Nick McKenzie and Jessica Schulberg contributed reporting. Map by Alissa Scheller.

Read more: