On the go and no time to finish that story right now? Your News is the place for you to save content to read later from any device. Register with us and content you save will appear here so you can access them to read later.

Inside Walmart's corporate offices in Brazil, one local contact was known as the "sorceress" for the ability to obtain government permits quickly.

In India, concerns about bribery were met with a "wink and a nod"by Walmart's local business partner. In China, money was funneled to a local landlord for "government relationship consulting services." And in Mexico, cars and computers were donated to governments in communities where Walmart was planning to build new stores.

For more than a decade, Walmart used middlemen to make dubious payments to governments around the globe in order to open new locations, US prosecutors and securities regulators said in a settlement agreement Thursday. But even as employees frequently raised alarm, the company's top leaders did little to prevent Walmart from being involved in bribery and corruption schemes.

That lack of internal control led to a seven-year inquiry that culminated Thursday with Walmart's Brazilian subsidiary pleading guilty to a federal crime. The guilty plea, and the US$282 million ($427.7m) in fines that Walmart has agreed to pay, capped one of the biggest investigations ever under the Foreign Corrupt Practices Act, which makes it illegal for US corporations to bribe overseas officials.

"Walmart profited from rapid international expansion, but in doing so chose not to take necessary steps to avoid corruption," Brian A. Benczkowski, an assistant attorney general, said in a statement.

The investigation, which was conducted by the Department of Justice and the Securities and Exchange Commission, came after The New York Times revealed in 2012 that Walmart had made suspicious payments to officials in Mexico and then tried to conceal them from top executives at the company's headquarters in Bentonville, Arkansas. And even when the issues reached the main office, an internal investigation essentially went nowhere.

The Times' reporting set off years of legal trouble and executive reshuffling at Walmart. The company has spent roughly US$900m on lawyers and investigators trying to root out the problems, as well as on hiring more people to bolster its compliance systems. Regulators said Thursday it was not only Walmart's drive to grow quickly but its "low-cost philosophy" that led to poor internal controls.

Shoppers at Walmart's Bodega Aurrera in San Cristobal de las Casas, Mexico. Photo / Adriana Zehbrauskas / New York Times

The fine Walmart will pay is less than the US$600m that federal prosecutors and regulators had sought when Walmart was discussing a plea agreement during the waning days of the Obama administration, the Times reported in November.

Walmart was able to negotiate a lower fine after President Donald Trump, who had previously criticised the Foreign Corrupt Practices Act, took office. Walmart generated a profit of about US$7 billion in its 2018 fiscal year.

The plea agreement, which was technically related to the company's improper record-keeping, also showed that problems went far beyond its operations in Mexico, the original focus of the Times' reporting.

Federal regulators said Walmart looked the other way as subsidiaries on three continents paid millions of dollars to middlemen who helped the company obtain permits and other government approvals from July 2000 to April 2011.

In Brazil, many payments flowed through the "sorceress," an otherwise unidentified individual who was also nicknamed the "genie" for sorting "things out like magic," according to court documents.

This person charged a steep price, roughly US$400,000, to help smooth the process of getting building permits. Walmart employees in Brazil raised alarms that the "sorceress" may have been a government employee, but those concerns went unheeded.

The questionable payments made in India were often recorded on the company's books with vague descriptions like "professional fees" and "incidental." As late as July 2011, Walmart received an anonymous tip that an employee in India was involved in a scheme to make improper payments to government officials, but the company never looked into it.

In a statement, Walmart said federal regulators had acknowledged the steps the company had taken to improve its anti-corruption measures since the investigations began seven years ago. "Walmart is committed to doing business the right way, and that means acting ethically everywhere we operate," Walmart's chief executive, Doug McMillon, said.

The Times' investigation included extensive interviews with a former Walmart executive in Mexico, who described how the company delivered envelopes of cash to officials to buy zoning approvals, reductions in environmental fees and the loyalty of neighbourhood leaders.

The settlement agreement that Walmart reached with regulators outlines many of the problems first detailed in the Times investigation. By the time the company learned about the bribes in 2005, Mexico was a huge profit center and Walmart was seeking to open new stores at a record pace.

Walmart chief executive Doug McMillon. Photo / Getty Images

A lawyer for the Mexico unit, according to the settlement, said Walmart determined which government officials needed to be paid and then funneled the money through middlemen known as "gestores." The gestores would receive a check from Walmart, cash it and then use the proceeds to pay the officials.

Another Walmart employee in Mexico said there were no records showing what work the gestores did, whom they met with or how many hours they worked. Walmart investigators raised concerns about these payments and recommended that the company conduct further inquiry.

But the investigation was eventually handed over to a lawyer in the Mexico unit, who had been accused of authorising many of the payments. That lawyer concluded that the "corruption allegations were unsubstantiated."

The bribery scandal was a huge blow to Walmart's reputation, spurring investor lawsuits and broader questions about the company's leadership.

Many of Walmart's most senior executives in Mexico, India and Bentonville, Arkansas, left the company in the wake of the Times' investigation.

The case also highlights the perils of US corporations seeking to increase their profits by expanding in countries with different legal systems and political cultures. In 1990, all of Walmart's stores were in the United States. Today, the company operates in 27 countries and continues to expand. A year ago, Walmart paid US$16b for a majority stake in Flipkart, India's largest online retailer.

Like many US companies, Walmart often forms joint ventures with local businesses, which has helped the company get established faster. But in some cases, Walmart failed to adequately vet its local partners for signs of corruption, federal prosecutors said.

"Even the largest of US companies operating abroad are bound by US laws," said the prosecutor, Benczkowski.