Deutsche Bank has struck a deal worth $7.2 billion with the U.S. government to settle claims that it packaged and sold toxic mortgages between 2005 and 2007.
Risky investments cobbled together by many global banks, including Deutsche Bank (DB), played a key role in the meltdown of the U.S. housing market and the global financial crisis that followed.
Under the preliminary deal announced late Thursday, Germany's biggest lender said it would pay a fine of $3.1 billion and put another $4.1 billion towards consumer relief programs in the U.S.
This comes at the same time as Swiss bank Credit Suisse (CS) announced a similar settlement over mortgage-backed securities. Under its $5.3 billion deal with the U.S. Department of Justice, the bank will pay a $2.5 billion fine and put $2.8 billion towards financial help for consumers.
Other big Wall Street banks, including JPMorgan Chase (JPM), Citigroup (C), Goldman Sachs (GS) and Morgan Stanley (MS), reached similar deals totaling about $45 billion in recent years in relation to their their pre-crisis mortgage activities.
Deutsche Bank's settlement is significantly lower than the $14 billion originally demanded by the Justice Department three months ago.
The bank says it's forecasting a $1.2 billion hit to its fourth-quarter profit from the fine.
The U.S. Justice Department wasn't immediately available for comment.
Its original demand back in September was so huge and unexpected that it prompted Deustche Bank shares to crash to their lowest level in over 30 years.
Investors worried such a penalty could hobble the bank, which has already been weakened by stricter banking regulations, hefty legal costs and low interest rates.
Related: Barclays sued by US over billions of dollars in toxic mortgages
Local media even reported that Germany was considering a state-backed rescue for the bank, though the government quickly said a bailout deal was not in the cards.
Shares in the bank have staged a recovery since their September lows, but are still down by about 20% in 2016.
Deutsche Bank has already shelled out billions to settle other charges that it conspired to manipulate global interest rates and colluded with other banks to rig foreign exchange rates.
Related: World's oldest bank seeks government bailout
The timing of the Deutsche Bank settlement is noteworthy, coming just before President-elect Donald Trump takes over the White House.
Trump has borrowed $360 million from Deutsche Bank, according to U.S. Rep. Maxine Waters of California, a Democrat.
Delaying the settlement until after Trump's inauguration could have created a perceived conflict of interest, especially if the new U.S. administration extended friendlier terms to the bank.
-- Rob McLean and Rishi Iyengar contributed to this report.