Jason Hiner/CNET

Microsoft agreed Monday to pay more than $25 million, including an $8.7 million criminal penalty, to settle charges that it bribed government officials in Hungary. The tech giant settled with both the US Securities and Exchange Commission (PDF) and the Department of Justice.

Microsoft's subsidiary in Hungary allegedly violated the Foreign Corrupt Practices Act by providing discounted software licenses to its resellers, distributors and other third parties, according to the SEC. The discounts were then allegedly used for "improper payments" for foreign government officials to secure software license sales for Microsoft. Subsidiaries in Saudi Arabia and Thailand also gave "improper travel and gifts" to government officials through slush funds maintained by Microsoft's vendors and resellers, according to the SEC.

Microsoft agreed to pay the SEC more than $16 million without admitting or denying the changes. The tech giant also agreed to pay the Justice Department an $8.7 million criminal penalty related to the matter.

Microsoft President Brad Smith sent an email to Microsoft employees after the SEC and Department of Justice announced an agreement was reached. Smith said the misconduct was limited to a small number of Microsoft Hungary employees, who have since been let go. In their place, Microsoft has put a new set of leaders at the subsidiary. Smith said the fired employees' conduct was "completely unacceptable."

"At one level, we should all recognize that this misconduct involved a small number of employees at Microsoft Hungary, all of whom are no longer with the company. We're fortunate to have in place today a new set of leaders at our Hungarian subsidiary who are committed to the company's high ethical standards," Smith said in the email.

Smith also listed a number of changes the company has implemented like creating a discount transparency program for public sector sales, strengthening its anti-corruption program, and increasing its capability to prevent potential violations by using machine learning.