Goldman Sachs Group Inc. agreed to pay $3.15 billion to repurchase residential mortgage-backed securities to resolve federal claims tied to the sale of the bonds to Fannie Mae and Freddie Mac.

The buyback represents a premium of about $1.2 billion and makes the two U.S.-owned mortgage-finance companies whole on the securities, the Federal Housing Finance Agency, the firms' government overseer, said Friday. The cost of the settlement is "substantially covered" by Goldman Sachs's reserves, the New York-based bank said in a separate statement.

Goldman Sachs is the 15th bank to settle all claims after the FHFA sued 18 firms in 2011 seeking to recoup taxpayer costs from when the U.S. took control of Fannie Mae and Freddie Mac in 2008, at the height of the financial crisis. The $1.2 billion cost surpasses Goldman Sachs's $550 million payment in 2010 to end a Securities and Exchange Commission suit over the marketing of a synthetic collateralized debt obligation dubbed Abacus 2007-AC1.

The bank's cost could be lower than $1.2 billion if it's able to sell the securities at a higher price than their current value. Other banks have opted for a cash payment to settle claims against them.

In July, Goldman Sachs said it set aside $284 million in the second quarter for litigation and regulatory proceedings, up from $149 million a year earlier. The case had been set for trial in September. The bank will pay $2.15 billion to Freddie Mac and $1 billion to Fannie Mae for the securities, the FHFA said. The agency said in its original lawsuit that the two mortgage-finance firms bought $11.1 billion from Goldman Sachs.

Morgan Stanley agreed in February to pay $1.25 billion as part of a settlement over $10.6 billion in securities. JPMorgan Chase & Co. agreed last year to pay $4 billion to settle claims related to about $33 billion in mortgage bonds.

Bank of America Corp. announced a $9.5 billion accord in March, including paying $6.3 billion in cash to Fannie Mae and Freddie Mac and buying back $3.2 billion of mortgage bonds from them. The housing-finance companies bought about $57 billion of bonds from Bank of America and its predecessor firms.

U.S. District Judge Denise Cote said in a July ruling that all except four of the FHFA cases had been settled. The remaining cases involved Goldman Sachs, HSBC North America Holdings Inc., Nomura Holding America Inc. and RBS Securities Inc., she said.

Goldman Sachs had asked Cote in June to rule against the FHFA, saying that a U.S. Supreme Court ruling that month meant that the agency had waited too long to file the claims in 2011. The FHFA this month had cited an appeals court ruling that allowed the National Credit Union Administration to press securities cases against banks despite questions about time limits.

Fannie Mae and Freddie Mac received $187.5 billion in U.S. aid and have returned more than $200 billion under terms of their federal conservatorship.

Subscribe Now

Access to authoritative analysis and perspective and our data-driven report series.

14-Day Free Trial

No credit card required. Complete access to articles, breaking news and industry data.