Goldman Sachs and Morgan Stanley have agreed to a $557 million settlement over alleged loan servicing and foreclosure abuses, the Federal Reserve announced Wednesday.

Under the deal, Morgan Stanley (MS) will offer $97 million in direct cash payments to borrowers and $130 million worth of other relief, including loan modifications and the forgiveness of deficiency judgments. Goldman (GS) will pay $135 million to borrowers and offer $195 million worth of relief.

The agreement covers more than 220,000 borrowers whose homes were in foreclosure in 2009 and 2010 and whose mortgages were serviced by the two banks' former subsidiaries: Goldman's Litton Loan Servicing and Morgan's Saxon Mortgage Services. It follows the $8.5 billion settlement announced last week by the Federal Reserve and the Office of the Comptroller of the Currency with 10 other banks over foreclosure issues.

That settlement arose from an April 2011 enforcement action against those banks that required them to hire independent consultants to investigate alleged foreclosure abuses and compensate victims. But that process, known as the Independent Foreclosure Review, proved expensive and slow-going, and was abandoned in favor of last week's settlement.

Goldman Sachs and Morgan Stanley were ordered to review their subsidiaries' foreclosure practices in September 2011 and April 2012, respectively, but those reviews never got underway and will be scrapped as a result of Wednesday's deal.

Related: Morgan Stanley defers executive bonuses

"We're pleased to settle this matter," Morgan Stanley spokesman Mark Lake said. Goldman spokesman Michael DuVally said the bank was "pleased to have resolved this matter concerning Litton Loan Servicing, which we sold over a year ago."

Morgan Stanley sold Saxon Mortgage Services last year. Both Morgan Stanley and Goldman are now out of the mortgage-servicing business.

As a result of the settlements announced this month, more than four million borrowers will split a total of $3.5 billion in cash compensation, with payments ranging from a few hundred dollars to potentially as much as $125,000 in a small percentage of cases. Those eligible are expected to be contacted by the end of March, regulators said.

Roughly $5.5 billion in total has been earmarked for mortgage assistance.