By MATTHEW BARAKAT Associated Press

ALEXANDRIA, Va. (AP) — Walmart agreed Thursday to pay a $138 million criminal penalty to settle Justice Department allegations that its Brazilian subsidiary secretly funneled more than $500,000 to an intermediary known as a "sorceress" for her uncanny ability to make permit problems disappear.

Prosecutors went after Walmart under the Foreign Corrupt Practices Act, which prohibits American companies operating abroad from using bribery and other illegal methods.

Walmart did not immediately respond to a call and emails seeking comment. A representative of Walmart Brazil said the company would not comment.

The plea agreement filed in federal court in Alexandria shows Walmart has agreed to pay $138 million to avoid prosecution, while its Brazilian subsidiary, WMT Brasilia, pleads guilty to a single violation.

The court documents say the corruption occurred in 2009 and 2010, and that the subsidiary's corrupt acts caused the parent company to submit inaccurate financial records. In particular, the payments to the intermediary were recorded as payments to a construction company, even though there were numerous "red flags" to indicate that the intermediary was actually a government official. Walmart Brazil was barred at the time from hiring civil servants.

The federal agreement does not identify the intermediary, but describes her in some detail: It says she became known inside Walmart Brazil as a "sorceress" or "genie" for her "ability to acquire permits quickly by 'sort(ing) things out like magic.'"

The plea agreement also includes a provision barring the Brazilian subsidiary from making public claims or issuing press releases contradicting the facts outlined under the plea agreement.

According to the Securities and Exchange Commission, companies including Halliburton, Anheuser-Busch InBev, JPMorgan and Panasonic Corp. have all reached multimillion settlements under the Foreign Corrupt Practices Act since 2016.

Bentonville, Arkansas-based Walmart, one of the world's largest retailers, recently reported quarterly earnings of $3.84 billion. It announced last year that after "a thoughtful and deliberate review," it decided to sell 80 percent of its stake in Walmart Brazil to Advent International, at a loss of $4.5 billion. At the time, the subsidiary had 438 stores in 18 Brazilian states.

___

AP Correspondent Yesica Fisch in Rio de Janeiro contributed to this story.