Walmart, the country’s largest retailer, on Thursday agreed to pay $282 million to settle federal criminal and civil charges that it ignored evidence of internal corruption for years that helped fuel its massive overseas expansion.

The company acknowledged wrongdoing as part of the settlements with the Justice Department and the Securities and Exchange Commission. The settlements end a seven-year investigation into the company’s compliance with the Foreign Corrupt Practices Act, which prohibits U.S. companies from bribing foreign officials to help their businesses.

For more than a decade, between 2000 and 2011, Walmart executives were aware of problems with its anti-corruption programs at its foreign subsidiaries, including in Mexico, Brazil and China, but failed to act, according to court documents. The internal failures allowed the company to open its overseas stores more quickly than it would have otherwise and make additional profit, federal officials said.

The company reported $120.8 billion in international sales last year, up from about $99 billion 10 years ago.

“Walmart valued international growth and cost-cutting over compliance,” Charles Cain, chief of the SEC’s Foreign Corrupt Practices Act division, said in a statement.

In 2005, a former Walmart attorney reported that he had overseen a scheme in Mexico in which a third party made improper payments to government officials to obtain permits and licenses. The third party submitted invoices that specified that the payments were for “avoiding a requirement” and “influence,” the Justice Department said in a statement.

Walmart Brazil indirectly hired a third party, who was internally known as the “sorceress” or “genie,” though company officials knew of several “red flags” that prevented them from hiring her directly, according to the Justice Department. In 2009, that third party made improper payments to government inspectors related to construction of Walmart stores there.

“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,” Assistant Attorney General Brian A. Benczkowski said.

Walmart said in a statement that it had since enhanced its global anti-corruption policies. “Walmart is committed to doing business the right way, and that means acting ethically everywhere we operate," Doug McMillon, Walmart president and CEO, said in a statement. "We want to be the most trusted retailer, and a key to this is maintaining our culture of integrity.”

The company’s rapid international expansion has slowed recently as it has struggled to win over shoppers in certain markets. Walmart closed all of its stores in South Korea and Germany in 2006, and last year announced that it was pulling back from investments in the United Kingdom and Brazil. The company’s international sales fell about 4.9 percent in the most recent quarter, while U.S. sales rose 3.3 percent.

The company agreed to hire a independent compliance monitor for two years and entered into a three-year non-prosecution agreement with the Justice Department as part of the settlements. Walmart received a “reduction” on parts of the penalties despite not quickly providing documents and information to the government related to its business in Mexico and only disclosing the conduct in Brazil, China and India after government investigations of other parts of its business had begun, the Justice Department said.

The Justice Department portion of the $282 million settlement was $137 million, and Walmart, for example, received a 20 percent reduction off the sentencing guidelines for the portion related to Mexico. It received a 25 percent reduction for the portion related to Brazil, China and India.

Abha Bhattarai contributed to this report.