The US government and five big banks sealed a $25 billion deal Monday aimed at addressing widespread mortgage abuses and getting the depressed housing market restarted. The Justice Department said the deal, first announced last month, to force banks to ease terms for troubled home-loan borrowers and compensate those who suffered administrative abuse in foreclosures, had been finalized via court filings. The judgment requires the five banks -- Bank of America, JPMorgan Chase, Wells Fargo, Citibank and Ally Financial -- to commit $20 billion to various forms of relief for home-loan borrowers, including writedowns of principal, refinancings, and other assistance for homeowners unable to fully service their mortgages. They also have to pay a group of 49 states $5 billion in penalties and contributions to a fund to provide cash payments to former borrowers whose homes were seized unfairly between 2008 and 2011, the worst years of the housing crisis. The payout for Bank of America, which took over Countrywide, the giant mortgage servicer blamed for widespread abuses, is $11.8 billion. The hit to Wells Fargo is $5.4 billion; to JPMorgan Chase $5.3 billion, to Citigroup $2.2 billion; and Ally, $310 million. The Department of Justice said the court filings also set new standards for the banks that \"will prevent foreclosure abuses of the past, such as robo-signing, improper documentation and lost paperwork, and create new consumer protections.\" Analysts said that the size of the settlement is a drop in the bucket compared to the hundreds of billions of dollars in homeowners\' lost equity in the crash, but that it would help the banks get past some of their legal troubles. But the Justice Department said the new agreement does not protect the banks from criminal charges related to the same issues addressed in the civil case filed by the states and federal government.