By Liz Hoffman

Goldman Sachs Group Inc. restated its second-quarter earnings lower Friday after reaching a $3.9 billion settlement with the government of Malaysia to resolve a long-running investigation into its work for a corrupt investment fund.

The bank set aside an additional $2 billion in legal provisions in the quarter, according to Friday's filing, much of which is likely to go to the U.S. Justice Department to settle its allegations related to 1MDB. Federal prosecutors have accused Goldman of violating antibribery and corruption laws by ignoring warning signs at 1MDB in pursuit of deal fees that ultimately exceeded $600 million.

Under the settlement, Goldman will pay $2.5 billion in cash to the Malaysian government to settle allegations that it enabled the theft of billions of dollars from the fund, known as 1MDB. It also guaranteed the recovery of $1.4 billion in assets allegedly stolen from the fund.

The Wall Street Journal reported in December that U.S. prosecutors were seeking a fine of around $2 billion on top of a guilty plea by a Goldman subsidiary and ongoing oversight of the bank's compliance procedures.

All in, the 1MDB affair is likely to cost Goldman more in penalties than the $5.1 billion it paid to settle government investigations into its mortgage-trading activities around the 2008 housing crisis. It didn't admit to wrongdoing then.