Kevin McCoy, Kaja Whitehouse, and Paul Davidson

USA TODAY

Goldman Sachs Group (GS) has reached a nearly $5.1 billion tentative settlement of a federal and state investigation of the investment banking giant's handling of mortgage-backed securities before the national financial crisis, the bank said Thursday.

The New York City-based bank will pay a $2.4 billion civil monetary penalty, make $875 million in cash payments and provide $1.8 billion in consumer relief — including mortgage principal forgiveness for underwater homeowners and distressed borrowers, forecloseure prevention, support for debt restructuring and other programs.

Goldman said the settlement would reduce the bank's fourth-quarter 2015 earnings, scheduled to be announced Wednesday, by approximately $1.5 billion on an after-tax basis.

Before announcing the charge, Wall Street analysts surveyed by research firm FactSet had forecast a $3.64 per share drop in Goldman's fourth-quarter earnings, down from $4.38 in 2014. The prediction came as the bank grapples with declines in trading fees.

"We are please to have reached an agreement in principle to resolve these matters," Goldman Chairman and CEO Lloyed Blankfein said in a statement announcing the deal.

Goldman’s stock fell 0.4% in after-hours trading to $161.39.

The settlement would resolve actual and potential civil claims by the U.S. Department of Justice, the New York and Illinois attorneys general, the National Credit Union Administration and the Federal Home Loan Banks of Chicago and Seattle. The authorities investigated Goldman's securitization, underwriting and sale of residential mortgage-backed securities from 2005 to 2007.

Generally speaking, many such loans proved to be riskier than advertised to buyers, and ultimately helped spark the 2008 financial crisis. Other major banks, including JPMorgan Chase, Citigroup and Bank of America, have reached similar, multi-billion dollar settlements.

JPMorgan, Justice Dept. reach $13B settlement

Goldman cautioned, however, that its agreement in principle is subject to negotiation of definitive documentation. There's no assurance that the bank and government authorities will reach final agreement, Goldman said.

Bank of America pays record $16.65B penalty

Separately, the bank also agreed Thursday to pay a $15 million settlement of charges that it improperly handled short sales for customers.

In a short sale, an investor sells borrowed stock in anticipation of a price decline and eventually must return an equal number of shares. When customers asked Goldman to locate a stock for short-selling, the bank told them it had located the security without performing an adequate review to verify the information was accurate, the Securities and Exchange Commission said.

Goldman based its responses to clients on a computer function that showed certain stocks were was available at the start of the day even though the inventory was depleted later.

“Goldman Sachs failed to meet its obligations by allowing customers to engage in short selling without determining whether the securities could reasonably be borrowed at settlement,” said Andrew Ceresney, director of the SEC’s enforcement division.

Goldman spokesman Michael DuVally said the bank was "pleased to have resolved this matter with the SEC.”