Filed on behalf of the Justice Department, the Department of Housing and Urban Development and 49 state attorneys general, the agreement is the largest federal-state civil settlement ever obtained, the Justice Department said.
The agreement includes $5 billion in fines and "more than $20 billion in consumer relief," the department said in a statement.
It also provides for new standards on servicing loans and on foreclosure practices.
Charges of illegal foreclosure practices are what triggered the agreement in the first place. Banks were charged with systematically cheating consumers of due process, given they were handling foreclosures so quickly they were, essentially cheating individuals of their basic rights.
One of the more infamous practices was called "robo-signing," which entailed signing documents for foreclosures so quickly they could not possibly have been read by the individual signing them.
The agreement calls for relief to some homeowners who are close to default on their loans and who owe more on their loans than the value of their homes -- a condition known as being underwater.
It also includes "anti-blight" provisions meant to help neighborhoods where rampant foreclosures have brought down local property values due to the number of vacant properties going to seed or being vandalized.
The agreement involves the country's five largest mortgage lenders: Bank of America Corp., JPMorgan Chase & Co., Wells Fargo & Company, Citigroup Inc. and Ally Financial Inc.
Celebrity Couples of 2014 [PHOTOS]