WASHINGTON (Reuters) - Walmart Inc said on Thursday it will pay $282 million to settle a seven-year-long investigation into whether its overseas units in Mexico, Brazil, China and India violated the U.S. Foreign Corrupt Practices Act.

FILE PHOTO: The main entrance to a Walmart store is pictured in Sao Paulo, Brazil February 14, 2018. REUTERS/Paulo Whitaker/File Photo

The retailer will pay more than $144 million to settle charges by the Securities and Exchange Commission and about $138 million to resolve parallel criminal charges by the U.S. Department of Justice, according to court and regulatory filings.

In a separate regulatory filing, Walmart said the $282 million was part of a “global settlement” and ended all FCPA-related investigations into the retailer and its overseas businesses.

The Justice Department launched an investigation of the retailer after a series of New York Times articles in 2012 described alleged bribes paid by Walmart in Mexico to obtain permits to build stores there.

The reports spurred a wide-reaching investigation by the department into the behavior of Walmart subsidiaries around the globe, including in Mexico, Brazil, China and India.

“Walmart profited from rapid international expansion, but in doing so chose not to take necessary steps to avoid corruption,” Assistant Attorney General Brian A. Benczkowski of the Justice Department’s Criminal Division said on Thursday.

“In numerous instances, senior Walmart employees knew of failures of its anti-corruption-related internal controls involving foreign subsidiaries, and yet Walmart failed for years to implement sufficient controls comporting with U.S. criminal laws,” he added.

The Justice Department said the failures led Walmart’s subsidiaries in Mexico, India, Brazil and China to hire third-party intermediaries and allowed these middlemen to make improper payments to government officials to obtain store permits and licenses.

Walmart did not voluntarily disclose the conduct in Mexico and only disclosed the conduct in Brazil, China and India after the government had already begun investigating the situation in Mexico, the department added.

Charles Cain, chief of the SEC Enforcement Division’s FCPA Unit, said “Walmart valued international growth and cost-cutting over compliance.”

The retailer’s chief executive said on Thursday Walmart had enhanced its “policies, procedures and systems and invested tremendous resources globally into ethics and compliance.”

Walmart also said it had spent over $900 million on related matters, including FCPA inquiries, investigations and its global compliance program, in the past seven years.

WALMART BRAZIL PLEADS GUILTY

As part of the settlement, Walmart Brazil has entered a guilty plea in the U.S. District Court for the Eastern District of Virginia, the retailer said.

According to court filings, from around 2009 to 2010, Walmart Brazil knowingly led its parent to maintain false records, which then made it into the company’s consolidated financial statements.

Walmart Brazil and its employees recorded $527,000 in payments to an intermediary for assistance in acquiring construction permits, as a payment to certain construction companies, the court filings show.

The intermediary’s ability to obtain licenses and permits quickly “by sorting things out like magic” earned the middleman the nickname “sorceress” or “genie” within Walmart Brazil, the court filings said.

In June 2018, the retailer sold a majority stake in its Brazilian operations to private equity firm Advent International.

Walmart has also entered into a non-prosecution agreement with the Justice Department. That means the department will not prosecute the company, if it meets obligations set forth in the agreement for three years.

In October, the retailer agreed to pay $160 million to settle a class action by investors unhappy with the way Walmart handled the foreign bribery investigation. Walmart admitted no wrongdoing as part of that settlement.