Goldman Sachs Group Inc. will pay $5.1 billion to settle a U.S. probe into its handling of mortgage-backed securities involving allegations that loans weren’t properly vetted before being sold to investors as high-quality bonds.

New York-based Goldman Sachs, which announced details of the accord in January, will pay a $2.39 billion civil penalty, make $875 million in cash payments and provide $1.8 billion in consumer relief, according to a Justice Department statement.

“This resolution holds Goldman Sachs accountable for its serious misconduct in falsely assuring investors that securities it sold were backed by sound mortgages, when it knew that they were full of mortgages that were likely to fail,” said Acting Associate Attorney General Stuart Delery.

Monday’s resolution is the fifth multibillion-dollar settlement reached with U.S. banks resulting from the government’s push to hold Wall Street firms to account for creating and selling subprime mortgage bonds that helped spur the 2008 financial crisis.

Other banks, including Royal Bank of Scotland Group Plc and Deutsche Bank AG remain under investigation, people familiar with the matter have said.

Bank Provisions

The bank already provisioned for most of the charges. Goldman set aside $1.95 billion for legal and litigation expenses in the fourth quarter, and $4.01 billion for all of 2015, more than double the totals for the two previous years combined.

In addition to the Justice Department, the deal resolves claims from authorities including New York, California and Illinois attorneys general for the bank’s securitization, underwriting and sale of bonds from 2005 to 2007. The accord would also resolve claims by the National Credit Union Administration and the Federal Home Loan Banks of Chicago and Seattle, according to the statement.

The government’s mortgage-backed security resolutions stem from a working group of prosecutors and other officials that President Barack Obama ordered up in 2012 to punish Wall Street for fueling the financial crisis with bonds linked to souring mortgages. Until then, the Justice Department had been pilloried for years for not having brought significant cases against banks and their executives.

False Representations

Goldman “agreed” to a statement of facts put together as part of the resolution, which gives examples of what the government said were false and misleading representations to investors.

In one August 2006 RMBS, the bank’s due diligence reported an “unusually high” percentage of loans with credit and compliance defects, according to the statement.

When presented with the results, the Goldman employees responsible for overseeing the securities asked “How do we know that we caught everything?” One transaction manager responded “we don’t,” according to the statement. Another responded, “Depends on what you mean by everything? Because of the limited sampling . . . we don’t catch everything . . .”

Goldman approved this RMBS for securitization without requiring any further due diligence, according to the statement.