A group of 10 mortgage providers have agreed to pay a total of $8.5bn as compensation to end a US government-mandated review of housing crisis foreclosures.

Bank of America Corp, Citigroup Inc, JPMorgan Case & Co, Wells Fargo & Co, MetLife Bank and five others will pay $3.3bn directly to eligible borrowers, and $5.2bn in loan modifications and forgiveness, regulators said.

A total of 3.8 million people are eligible for payments under the deal announced by the Office of Comptroller of the Currency, a bank regulator, and the Federal Reserve. Those payments could range from a few hundred dollars to up to $125,000.

The settlement is a response to charges of "robo-signing": Big banks, swamped with thousands of foreclosure filings, allegedly used an automated system to sign off on foreclosures, rather than personally reviewing each case.

Thousands of homeowners said they were wrongly evicted from their homes because of the practice.

Separately, Bank of America agreed to pay $11.6bn to government-backed mortgage financier Fannie Mae to settle claims related to mortgages that soured during the housing crash.

Many of those mortgages were originated by Countrywide Financial, which was the largest subprime mortgage lender in the United States. Bank of America acquired Countrywide in 2008.

The agreements come as US banks are showing renewed signs of financial health, extending their recovery from the 2008 crisis.

But critics say the deal allows the banks to escape responsibility for damages that could have cost them much more, perhaps hundreds of billions of dollars.