British bank HSBC has agreed to pay $249 million in compensation to home-loan borrowers hurt in the massive US mortgage and foreclosure scandal, US officials said Friday.

The Federal Reserve and the Office of the Comptroller of the Currency announced the deal, saying HSBC had to compensate borrowers affected by its "deficient practices in mortgage loan servicing and foreclosure processing."

The global banking giant will pay $96 million to eligible borrowers and $153 million in other assistance, including loan modifications, the statement said.

The cash payback affects more than 112,000 borrowers whose homes were in foreclosure in 2009 and 2010 with HSBC Bank and nonbank subsidiaries of HSBC, it said.

Depending on the case, eligible borrowers are expected to receive compensation ranging from hundreds of dollars up to $125,000.

The HSBC agreement follows a similar deal with a dozen US financial firms struck earlier in the month.

Combined with the HSBC payment, nearly 4.2 million borrowers will receive a total of $3.6 billion in cash and benefit from $5.7 billion in mortgage assistance, the official said.