Deutsche Bank (DB) - Get Report  has agreed to settle a U.S. Justice Department probe of its mortgage-backed securities sales before the 2008 financial crisis for $7.2 billion, about half what the government originally sought.

The deal, which is still subject to negotiations on final documentation, removes a cloud that has hung over  the largest German lender since Justice proposed a $14 billion settlement in September, spurring concern that the firm might need a bailout to meet its obligations. The shares fell 54% from their high at the end of last year, touching $11.48 in New York on Sept. 29, before rebounding.

Deutsche's agreement was announced at the same time that Credit Suisse disclosed a $5.3 billion settlement for its mortgage-backed securities sales, while British giant Barclays said it would fight U.S. claims in court. 

Mortgage-backed securities, which allowed lenders in the $15 trillion mortgage market to sell home loans to Wall Street and book the profits immediately rather than retain the risk, were blamed for high-risk loans that defaulted when the U.S. housing market bubble began to collapse in 2006.

The instruments became impossible to value, eventually spurring the failure of investment bank Lehman Brothers in September 2008 and prompting billions of dollars in bank bailouts as the government raced to contain damage to the economy.

Deutsche said it would pay $3.1 billion in penalties under the agreement and provide $4.1 billion in customer relief, according to a statement. "The consumer relief is expected to be primarily in the form of loan modifications and other assistance to homeowners and borrowers," and similar initiatives, the Frankfurt-based lender said, and it would be spread over five years. 

Deutsche Bank said it will take a pre-tax charge of about $1.17 billion to its fourth-quarter results but doesn't expect the settlement to have a material effect on its full-year performance. The bank had set aside about €5.9 billion for litigation reserves as of Sept. 30. 

"This is a constructive development -- a $1.17 billion overflow into the P&L is towards the lower end of market expectations," Jernej Omahen, a Goldman Sachs analyst, said in a note to clients on Friday. "A key area of concern has been removed."

Deutsche's settlement, if completed, would solve a potentially thorny ethical question for the incoming administration of President-elect Donald Trump, which faced the possibility of negotiations by his appointees with a bank that is one of his creditors.

Deutsche has led or participated in loans of at least $2.5 billion to companies affiliated with Trump, according to an analysis from the Wall Sreet Journalearlier this year. It has also made at least another $1 billion in loan commitments to Trump-affiliated entities.

Since 2012 alone, Trump has borrowed as much as $364 million from Deutsche Bank, according to Mother Jones, on four mortgages on three of his properties: Trump National Doral Golf Club in Miami, Trump International Hotel and Tower in Chicago, and the Trump International Hotel in Washington, D.C. 

Credit Suisse (CS) - Get Report , whose claims were also related to sales before the financial crisis, agreed to pay a civil penalty of $2.48 billion and provide customer relief totaling an additional $2.8 billion, spread out over five years, the Zurich-based company said in a statement. The bank will take a pre-tax charge of about $2 billion this quarter.

The provision is higher than Morgan Stanley analyst Magdalena Stoklosa had projected. She had estimated Credit Suisse would take an $800 million charge this quarter followed by another $1 billion in 2017, according to a note to clients Friday.

"We were expecting Credit Suisse to delay settlement into the new year," Stoklosa wrote. "There are no other outstanding litigation items of this size, hence we see the removal of uncertainty around this item as a positive."

Barclays (BCS) - Get Report , the British rival to the two European lenders, dismissed Justice Department claims that it engaged in fraudulent schemes to sell mortgage securities backed by defective loans as "disconnected from the facts."

The complaint in that case, filed Thursday in U.S. District Court in Brooklyn, cites 36 deals backed by $31 billion in loans extended to higher-risk borrowers, some of whom didn't fully document the sources of income that would enable them to pay the money back.

"The widespread fraud that investment banks like Barclays committed in the packaging and sale of residential mortgage-backed securities injured tens of thousands of investors and significantly contributed to the financial crisis," Principal Deputy Associate Attorney General Bill Baer said in a statement. "Millions of homeowners were left with homes they could not afford, leaving entire neighborhoods devastated."

Barclays fell 0.3% in U.S. trading to $11.04 on Friday, while Credit Suisse dropped 0.5% to $14.85. Deutsche climbed 0.5% to $18.63.