Microsoft is paying more than $25 million to settle federal corruption charges involving a bribery scheme in Hungary and other foreign offices.

The U.S. Securities and Exchange Commission said Microsoft will pay about $16.6 million to settle charges that it violated the Foreign Corrupt Practices Act. While the case centered on Hungary, the SEC said it also found improprieties at Microsoft offices in Saudi Arabia, Thailand and Turkey.

The Justice Department said Microsoft will also pay an $8.75 million criminal fine stemming from the Hungarian bid-rigging and bribery scheme.

The Wall Street Journal reported last August that investigations began when information “surfaced in 2013 in five other countries [and Hungary]. Microsoft made a push earlier this decade to expand in emerging markets, as well as smaller, middle-income countries like Hungary. In some cases, those bets have turned into legal and reputational challenges.”

Federal prosecutors said that from 2013 through 2015, a senior executive and other employees at the Hungary office took part in a scheme to “inflate margins in the Microsoft sales channel” in connection with Microsoft software licenses sold to Hungarian government agencies.

Savings were falsely recorded as discounts and used for corrupt purposes, the prosecutors said.

‘Breakout year:’ Microsoft soars with cloud revenues driving growth

Microsoft President Brad Smith said in a letter to employees Monday that the misconduct was “completely unacceptable” and involved a small number of employees.

Smith outlined changes to prevent public sector discounts from being used improperly and said the company is expanding its use of artificial intelligence to flag suspicious transactions.