The agreement was announced on Thursday by U.S. Attorney General Eric Holder, Department of Housing and Urban Development (HUD) Secretary Shaun Donovan, Iowa Attorney General Tom Miller and Colorado Attorney General John W. Suthers.
The unprecedented deal is the biggest settlement involving a single industry since a 1998 multistate tobacco deal. President Barack Obama called it a landmark settlement to turn the page on an era of recklessness.
"No action, no matter how meaningful, is going to, by itself, entirely heal the housing market. But this settlement is a start," Obama said.
Under the deal, five major banks - Bank of America, JPMorgan Chase, Wells Fargo, Citigroup and Ally Financial - will reduce loans for nearly 1 million households.
"It holds mortgage servicers accountable for abusive practices and requires them to commit more than $20 billion towards financial relief for consumers," Holder said.
The banks will send checks of $2,000 to about 750,000 Americans who were improperly foreclosed upon. They will have three years to fulfill the terms of the deal. All but one of the 50 states agreed to the deal. Oklahoma, the lone holdout, will receive no money.
During the financial crisis, home values sank, and millions edged toward foreclosure. Many companies processed foreclosures without verifying documents. Some employees signed papers they hadn't read or used fake signatures to speed foreclosures - an action known as robo-signing.
In California, much of the money will go to the most distressed homeowners. California's share of the nationwide settlement with mortgage lenders is $18 billion, and that includes $12 billion in principal reductions for homeowners.
Another $849 million will help homeowners refinance "underwater" loans - homeowners who owe more than their homes are worth. California has more than 2 million "underwater" borrowers.
"We would be able to bring an opportunity for homeowners who are underwater but current in their payments, allow them the ability to refinance their loans," said California Attorney General Kamala Harris.
Harris and her office have been negotiating with the banks for 13 months. They were able to strike a deal that singles out California in the nationwide agreement.
"We built into this, a California commitment that requires the banks, through an incentive and a penalty, to focus on our hardest hit communities. It's a very unique to California aspect of what has come out of this process," Harris said.
In addition, there will be $3.5 billion to help homeowners with their unpaid balances, $1.1 billion to help unemployed homeowners and cash penalties for banks that don't comply.
Before homeowners realize any money or mortgage relief, the attorney general says there will be a process.
"It will probably realistically be about 120 days," Harris said.
Bank of America will pay the most to borrowers - nearly $8.6 billion. Wells Fargo will pay about $4.3 billion, JPMorgan Chase will pay roughly $4.2 billion, Citigroup will pay about $1.8 billion and Ally Financial will pay $200 million. This does not include $5.5 billion in federal and state payments.
The agreement does not affect the 60 percent of home loans which are owned by Fannie Mae and Freddie Mac.
For more information about the settlement, visit www.nationalmortgagesettlement.com.
The Associated Press contributed to this report.