The Justice Department called the agreement "the largest settlement with a single entity in American history."
At issue are allegations that JPMorgan and firms it later purchased, Bear Stearns and Washington Mutual, sold risky mortgage securities during the housing bubble while misrepresenting their quality. These securities later failed in huge numbers, playing a key role in the 2008 crisis.
"Without a doubt, the conduct uncovered in this investigation helped sow the seeds of the mortgage meltdown," Attorney General Eric Holder said in a statement.
As part of the agreement, JPMorgan admitted to making "serious misrepresentations" to investors in mortgage-backed securities, the Justice Department said.
Bank executives were at pains to emphasize that they had not admitted to any specific violation of the law during a conference call with analysts Tuesday. Such an admission would provide ammunition for private lawsuits.
JPMorgan CEO Jamie Dimon said in a statement the firm was "pleased to have concluded this extensive agreement."
The $13 billion figure includes a $4 billion settlement announced last month by the Federal Housing Finance Agency (FHFA), which has overseen government-backed housing finance firms Fannie Mae and Freddie Mac since their 2008 bailout. JPMorgan agreed to pay $4 billion to resolve securities fraud claims and another $1.1 billion to repurchase mortgages sold to Fannie and Freddie.
Fannie and Freddie purchased billions of dollars' worth of mortgage-backed securities ahead of the crisis and required a government rescue in 2008 when those investments soured.
Tuesday's agreement, rumored for weeks, drew Dimon to Washington in September for negotiations with Holder.
Some $4 billion of the settlement has been earmarked to help consumers. This total includes $2 billion to be used for principal reductions for borrowers, and $2 billion worth of other assistance, New York Attorney General Eric Schneiderman said.
This assistance includes loan refinancing, donation of bank-owned properties, and new mortgage loans to low- and moderate-income families harmed by the crisis.
An independent monitor has been appointed to ensure compliance by the bank, which has agreed to complete the consumer-focused efforts by the end of 2017.
The National Credit Union Association will receive a $1.4 billion cash payment under the settlement, while the Federal Deposit Insurance Corporation will get $515 million. Among the states who brought claims against the bank, California will receive $299 million; Delaware will get $20 million; Illinois gets $100 million; Massachusetts receives $34 million; and New York will receive $614 million.
JPMorgan says the payments to the states and the two agencies -- along with the $4 billion due to Fannie and Freddie -- will be tax-deductible. The final $2 billion of the settlement consists of a penalty to be paid to the Justice Department, which is not tax-deductible.
As part of the accord, JPMorgan agreed not to pursue reimbursement for the costs associated with Washington Mutual from a WaMu receivership controlled since the bank's 2008 failure by the FDIC.
JPMorgan has argued that the FDIC is responsible for WaMu's liabilities, and Dimon told analysts the firm would "vigorously pursue" the FDIC receivership for costs associated with WaMu from private lawsuits.
The settlement does not address the question of whether any individual bankers engaged in criminal wrongdoing. There is an ongoing federal probe on this issue in California with which JPMorgan has agreed to cooperate.
JPMorgan CFO Marianne Lake said conduct at Bear Stearns and at WaMu prior to their 2008 acquisitions accounted for the lion's share of costs in Tuesday's settlement. JPMorgan "typically accounted for 20% or less of total losses" on the securities at issue in the case.
Other banks will likely be on the hook for similar settlements. Holder said Tuesday that JPMorgan "was not the only financial institution during this period to knowingly bundle toxic loans and sell them to unsuspecting investors."
JPMorgan (Fortune 500) was just one of 18 financial institutions , FHFA sued in 2011, accusing them of selling Fannie and Freddie securities that "had different and more risky characteristics than the descriptions contained in the marketing and sales materials."
The Justice Department, meanwhile, is reportedly looking to use the expected settlement with JPMorgan as a template for deals with other financial institutions suspected of engaging in similar tactics during the housing bubble.
The case is the latest in a series of legal headaches for JPMorgan, the country's largest bank by assets.
Last week, JPMorgan announced a $4.5 billion settlement with institutional investors who suffered losses on bubble-era mortgage securities. The firm has paid over $1 billion in fines in connection with last year's "London Whale" trading debacle, and $80 million more over alleged unfair credit card billing practices.
In July, the bank agreed to pay $410 million to settle charges that it manipulated electricity prices in California and the Midwest. It is also facing scrutiny over its hiring practices in China and its alleged involvement in the Libor rate-fixing scandal.
JPMorgan posted a loss for the third quarter based on its massive legal expenses. Dimon called the loss "painful" and warned that litigation costs could continue to be a drag on earnings for several quarters.
The bank said at the time that it was holding $23 billion in reserve for potential litigation expenses, but that its legal costs could be nearly $6 billion more than that in a worst-case scenario.
|Internet giant Sina caught in China porn crackdown|
|Don't assume you're safe from Heartbleed|
|Russia stocks fall as Ukraine crisis intensifies|
|Water becoming more valuable than gold|
|Will 7 Apples a day keep the bears away? - The Buzz|
|Overnight Avg Rate||Latest||Change||Last Week|
|30 yr fixed||4.24%||4.32%|
|15 yr fixed||3.25%||3.36%|
|30 yr refi||4.28%||4.31%|
|15 yr refi||3.30%||3.34%|
Today's featured rates: