Ocwen Financial Corp. will reduce struggling borrowers’ loan balances by $2 billion in an agreement with federal regulators and 49 states over foreclosure abuses.

The Consumer Financial Protection Bureau and state attorneys general announced the deal Thursday with the Atlanta-based company, one of the largest U.S. mortgage servicers. The regulators said Ocwen pushed borrowers into foreclosure through illegal actions, such as failing to promptly and accurately credit mortgage payments.