Walmart, the world’s biggest company, underpaid US taxes on nearly $2 billion worth of offshore cash, according to whistleblower documents filed by a former Walmart executive to the Internal Revenue Service (IRS) in 2011, and recently obtained by Quartz.

The firm avoided nearly $200 million in taxes on that money and “dramatically” overstated its foreign tax credits in 2009 and 2010 by routing payments from Luxembourg to the United States via the United Kingdom and not declaring they came from a tax haven, the whistleblower wrote.

If Walmart claimed all the tax credits, it could have improperly avoided paying close to $600 million in total via the maneuvers, according to the files. The whistleblower argued in the documents that the company should owe all that money to the IRS. A second former executive, who shared the files with Quartz, confirmed the whistleblower’s allegations.

Walmart denied any wrongdoing. “The transactions brought to our attention were appropriately reported to and audited by the IRS,” a spokesman said in an emailed statement. “The tax years covering this matter were closed by the IRS more than seven years ago.”

The spokesman declined to say whether the company explicitly told the IRS that the money originated in Luxembourg, rather than the United Kingdom.

Walmart’s history of alleged tax dodging poses a challenge to the firm’s efforts to rebrand itself as an exemplar of conscious capitalism, especially as it regroups from settling a seven-year bribery investigation for $282 million in June. In September, Quartz obtained files showing the firm may owe up to $2.6 billion in US taxes, avoided by creating a “fictitious” Chinese entity. And in 2015, a report by the Americans for Tax Fairness alleged that Walmart had placed assets worth at least $76 billion in tax havens where it had no retail stores—a figure equal to 37% of the company’s total assets at the time. Walmart has contested both reports.

According to the 2011 files, between 2009 and 2010 Walmart loaned roughly £1.2 billion (nearly $2 billion at the time) from its low-tax Luxembourg subsidiary to its US headquarters. However, instead of sending the money directly to the United States and incurring high taxes, it first sent the transactions to subsidiaries in Britain where it owns ASDA, the United Kingdom’s second-largest supermarket chain. The whistleblower claimed that Walmart then reported on its tax return that the money had come from Britain—a country with fairly high business taxes—rather than Luxembourg, a tax haven. That gave the company the option to claim many more foreign tax credits in the United States, according to the files.

This was all part of a “coordinated plan,” the former executive alleges in the files, noting that the “fund flows all occurred within two days.” This method of “pure manipulation” of the tax code was common among multinationals, the second former executive told Quartz. “It’s just that Walmart did it in such a staggeringly sloppy way,” by making the transfers over just two days.

By putting the credits on its balance sheet, the whistleblower told the IRS, Walmart added about $200 million extra to its earnings each year—a nice, but far from critical, boost. The company’s total income (pdf, p.129) was $13.4 billion in 2009 and $14.3 billion in 2010.

The transactions described in the documents are not illegal, but they provide insight into the role the world’s biggest company plays in a problem that is endemic to global capitalism—massive companies using offshore tricks to cut their tax payments.

Walmart said it has a “robust program” to ensure tax compliance, involving internal and external tax experts and an outside law firm. “The IRS also has an on-site office at Walmart full-time, year-round. Through our participation in the IRS Compliance Assurance Process program, we have open and transparent discussions, and proactively share information about significant corporate transactions as they occur, including these transactions brought to our attention,” the company said in a statement. Walmart has participated in the voluntary compliance program since 2005.

In total, US multinationals held about $1 trillion offshore at the end of 2017, according to the Federal Reserve. Giants such as Apple and Microsoft brazenly, but legally, book profits in tax havens like Ireland. Walmart, with annual revenue reaching $501 billion in 2018, has topped the Fortune Global 500 every year since 2014. Its owners, the Waltons—reportedly the world’s richest family—are said to add $100 million per day to their $191 billion fortune.

The whistleblower files include an eight-page memo describing the machinations, an 18-page document pulled from company servers that details years of loans made between Walmart’s entities, and an internal presentation explaining several tax-efficient ways of bringing cash into the United States. Quartz also obtained a 90-minute audio recording of IRS lawyers interviewing the whistleblower about the filing. Unlike the formal filing, the interview was not held under oath, but the whistleblower was told that any false statement could damage their chances of being rewarded. The whistleblower didn’t respond to several requests for comment from Quartz.

The IRS, which pays whistleblowers for revenue gained with the help of their information, didn’t take on the 2011 claim. The agency declined to comment on this story, citing a federal law that bans it from discussing individual taxpayers.

The former executive who spoke to Quartz suggested the IRS might not have pursued the case because it learned of the mechanism in previous whistleblower filings and was already trying to collect the avoided taxes. Omri Marian, a tax law professor at the University of California, Irvine said that was one plausible explanation for not pursuing it. The mechanism is “rather aggressive,” Marian said, but added: “It’s not something that is a slam-dunk in court for the IRS. If I’m the IRS I would probably try to solve this out of court.”

When asked by IRS agents what Walmart’s probable defense would be, the whistleblower said the company might point to the fact that the money had been paid to Luxembourg from the United Kingdom as part of a “double dipping” maneuver through which Walmart legally dodged British tax, and argue, “well, it’s just our cash.” They might also claim that, since the transactions took two days and were for slightly different amounts, they were sending different cash over, the whistleblower said.

Avoiding oversight

Walmart wouldn’t lie to the IRS about how the mechanism worked, but would refer to the transactions by a different name and omit some information, the whistleblower said in the interview with the IRS. “In the conversations with the IRS auditors, we wouldn’t have called it ‘956 planning,’” the former executive said, referring to a section of the tax code Walmart was allegedly trying to manipulate. “Inside the company it was called ‘956 planning,’ but [to the IRS] we would have called it ‘year-end cash management.’”

They also wouldn’t tell the IRS that the money had been in Luxembourg immediately before it was repatriated to the United Kingdom, the whistleblower said in their IRS interview. “If you simply leave out where the cash actually came from, the plan looks pretty nice,” they said.

In 2011, when a new senior tax executive saw the structure and agreed it didn’t hold up and was liable for taxation, Walmart changed the way it brought money to the United States from Europe, the whistleblower told the IRS. “Walmart was not intentionally cheating on its taxes—they had poor resources and poor controls, but they were cavalier about it. They didn’t care,” the second former executive said. “They fixed it going forward, but they didn’t fix it going back. They were also happy to keep the couple of hundred million—they didn’t amend their returns.”

The firm was helped by lax oversight from its auditor, the whistleblower told the IRS. “I definitely know that the auditor, EY, has never looked at the issue,” the whistleblower said during the interview. When an EY tax partner was told about potential problems with previous years’ returns, he said, “You know, I don’t want to hear about it,” according to the whistleblower.

The allegation speaks to what critics call a major flaw in the accounting industry—the conflict of interest held by auditors who are paid by the companies they’re auditing while trying to win lucrative consulting contracts from those same companies. “These guys are not looking for problems—they’re looking for opportunities,” the second former executive told Quartz, arguing that the EY tax partner’s real role “is to sell tax plans.”

EY didn’t respond when asked to provide comment on this story.

“A unified back-to-back plan”

In January 2010, Walmart had a problem. It had a pile of cash sitting in Luxembourg, which it wanted to bring into the United States. But transferring that cash straight from the tiny EU tax haven would incur a large tax bill.

So the firm sent the money from Luxembourg subsidiary Broadstreet of Munsbach in two batches to Walmart Stores UK, according to the whistleblower files. The next day, Walmart UK sent it to another British subsidiary, Broadstreet Great Wilson, which finally passed the cash on to the company’s US headquarters.

Walmart transferred the money—£615 million (around $980 million at the time)—as a loan and repaid it about three months later, according to the files. That meant that a quarter of the sum was effectively a taxable dividend, with Walmart liable for a tax bill of about $87.5 million, the former executive alleged in the files. Further, by claiming the money came from the United Kingdom, Walmart improperly received foreign tax credits worth about $200 million, according to the files. Those credits boosted the company’s earnings, the whistleblower said, and could be used to cut its tax bill either that year or in years to come.

A diagram submitted in the whistleblower application explains the 2010 structure.

In the files, the former executive named five employees from Walmart’s tax and treasury departments allegedly involved in coordinating the plan. “I would expect that the email traffic between…[the five]…would likely make the fact that this was all a unified back-to-back plan even more explicit,” the former executive wrote.

The McLagan maneuver

Walmart had used a similar scheme the year before, the whistleblower alleged.

This time, the Luxembourg firm loaned £600 million (then around $880 million) in January 2009 to ASDA, Walmart’s UK chain, which then loaned the money to US headquarters, according to the files. The files include an internal Powerpoint presentation that shows Walmart gaming out the transactions—which allegedly both took place on the same day—and comparing the plan with other options for bringing liquidity to the United States.

At the time, multinationals were allowed to make tax-free loans to their US branches if the money was repaid within 60 days. Walmart did send the money back to ASDA within that time frame, the files say. However, instead of repaying the Luxembourg firm, ASDA passed the money to another British subsidiary, named McLagan, which then sent the same money back to Walmart US, the former executive writes. (All three transactions again allegedly took place on the same day.)

The money eventually returned to Luxembourg in May 2009, the files say. As such, Walmart actually borrowed the money for 120 days, rather than 60, the former executive wrote. The whistleblower claims the company should again have had to pay tax on that money as a deemed dividend, and that any foreign tax credits were claimed “inappropriately.”

An internal Walmart document submitted in the whistleblower filing, gaming out the 2009 structure.

The second leg of the McLagan maneuver.

“Avoidance game”

It’s unclear if the IRS ever took any action against Walmart over the scheme. But the whistleblower files are a “powerful piece of evidence” that changes are needed to “a system that can treat even billion-dollar misrepresentations of this nature as simply part of some avoidance game,” argued Alex Cobham, CEO of the Tax Justice Network, a nonprofit.

“People have been imprisoned for the theft of a few dollars’ worth of food from Walmart stores,” said Cobham. “What would be the appropriate penalty for Walmart and its tax professionals seeking to deprive the people of hundreds of millions of dollars?”