A foreclosure-review system that failed to compensate mistreated borrowers has been mostly scrapped in an $8.5 billion agreement with the largest U.S. mortgage servicers.

U.S. regulators’ deal Monday with 10 mortgage servicers replaces an almost two-year, case-by-case review of flawed foreclosures. The Independent Foreclosure Review process — agreed to by 14 servicers in a 2011 settlement — has so far cost the servicers more than $1.5 billion in fees to the consultants reviewing cases.