FRANKFURT -- Deutsche Bank said Friday it has agreed on a $7.2 billion settlement with the U.S. Justice Department over its dealings in mortgage-backed bonds -- risky securities that helped start the global financial crisis.

Under the deal, which isn't yet final, Germany's biggest bank agreed to pay $3.1 billion in fines and $4.1 billion in compensation through such measures as easing loan repayment terms for homeowners and borrowers.

Credit Suisse also said it had agreed to a similar settlement under which it would pay $5.3 billion.

The settlements, which focus on activities in 2005-2007, revisit an ugly chapter of the global financial crisis, in which banks bundled mortgages from people with shaky credit into bonds whose risks many investors did not understand. When the mortgages went into default as the U.S. real estate market collapsed, so did the bonds, spreading losses and panic through the financial system.

The Deutsche Bank agreement lessens the financial cloud over the bank's shares, since it had earlier said it might have to pay as much as $14 billion. The bank has been struggling to put expensive litigation from past misconduct behind it. It said it would take a $1.17 billion hit to its fourth-quarter earnings from the civil penalty.

News of the settlements comes after the Justice Department sued Barclays Bank, accusing the bank and its employees of misrepresenting the quality of the loans they sold to tens of thousands of investors. The investors, which included credit unions, pension plans and university endowments, lost billions of dollars, the Justice Department said.