Goldman Sachs, one of Wall Street’s oldest and most prestigious banks, will pay $2.9 billion in penalties and fees to settle federal charges over its involvement in a Malaysian bribery scheme, the Justice Department announced Thursday.

Prosecutors in the Eastern District of New York charged the bank with conspiracy to violate the anti-bribery provisions of the Foreign Corrupt Practices Act, which forbids companies or individuals from paying foreign governments to retain business. The settlement includes the largest monetary penalty ever assessed under corporate criminal bribery law.

The Justice Department alleged that Goldman Sachs ignored signs of fraud among some of its senior bankers in a scheme that ultimately led to a Malaysian government-backed economic development corporation being defrauded out of $2.7 billion. About $1.6 billion of the $2.7 billion was used to pay officials in Malaysia and the United Arab Emirates to secure work issuing and selling bonds in international markets. The Justice Department agreed to defer prosecution of Goldman for three years while it abides by terms of the settlement.

Goldman earned $600 million in fees for helping that corporation, 1Malaysia Development Berhad, or 1MDB, raise $6.5 billion to support energy development in Malaysia, officials said in a news conference. But much of the money was looted, with some used to buy luxury real estate, yachts and even help finance the 2013 film “The Wolf of Wall Street.”

The Malaysian branch of Goldman reached a $3.9 billion settlement with Malaysian prosecutors in July and pleaded guilty to violating federal anti-bribery law in a Brooklyn federal court Thursday. Former Malaysian prime minister Najib Razak was sentenced to 12 years in prison by a Kuala Lumpur court for money-laundering connected with the scandal.

Former Republican National Committee deputy finance chair Elliot Broidy also pleaded guilty Tuesday to acting as an unregistered foreign agent, admitting to accepting millions of dollars to secretly lobby the Trump administration on behalf of Malaysian and Chinese interests to drop the Goldman investigation.

“The U.S. is home to many of the world’s preeminent financial institutions. Today’s charges and guilty pleas show the Department of Justice will not hesitate to hold them accountable for harm that they caused here and abroad,” acting assistant attorney general Brian Rabbitt told reporters.

Prosecutors have also charged two Goldman bankers and Malaysian businessman Low Taek Jho in connection with the scheme. One of the bankers, Timothy Leissner, pleaded guilty. The other, Roger Ng, has denied the charges. Low has also denied wrongdoing.

Of the $2.9 billion penalty, $1.3 billion will go to the Justice Department; $606 million to Malaysia; $400 million to the U.S. Securities and Exchange Commission; and $154 million to the Federal Reserve. The rest will be split among foreign financial regulators in the United Kingdom, Hong Kong and Singapore.

The bank reported a profit of $3.6 billion in the third quarter.

Goldman chairman and chief executive David Solomon told employees in an internal memo that it was “abundantly clear that certain former employees broke the law, lied to our colleagues and circumvented firm controls.”

He wrote that the company was “pleased to be putting these matters behind us,” but also said there were “lessons learned” for Goldman that would inform its future policies. He noted that the bank in recent years had created a reputational risk committee empowered to stop suspicious transactions, and doubled its global compliance division in the eight years since its involvement began with 1MDB.

Solomon wrote that Goldman now requires certifications from governments to use the proceeds of “sovereign-related financings” within six months of closing, and that those transactions are reviewed by an independent team of bankers. The company also created a “compliance forensics program” to detect insider threats.

The bank’s board of directors also said it will ask several current top executives to forfeit $174 million in salary and bonuses in an “acknowledgment of the firm’s institutional failures.” Solomon, the current CEO, John Waldron, its president and chief operating officer, and chief financial officer, Stephen Scherr will forfeit $31 million in salary, the board said in a statement.

It also will attempt to claw back $67 million from former executives, including former CEO Lloyd Blankfein.

Goldman’s stock appeared unaffected by Thursday’s announcement. It climbed nearly 1.3 percent to close at $205.47.

“The board views the 1MDB matter as an institutional failure, inconsistent with the high expectations it has for the firm,” the company said in a financial filing. “… While none of the past or current members of senior management were involved in or aware of the firm’s participation in any illicit activity at the time the firm arranged the bond transactions, the board has determined that it is appropriate in light of the findings of the government and regulatory investigations and the magnitude of the total 1MDB settlement that compensation for certain past and current members of senior management be impacted.”