(Bloomberg) -- Bankrupt mortgage servicer Ditech Holding Corp. saw its reorganization plan rejected on Wednesday after a federal judge ruled the company couldn’t sell its mortgage-servicing rights and reverse-mortgage business free and clear of consumer claims.

Federal bankruptcy Judge James Garrity Jr. rejected the plan after two days of hearing evidence and arguments earlier this month from lawyers for Ditech and a consumer creditor committee. The committee asserted the company shouldn’t be able to sell its businesses if it meant wiping out the ability of homeowners to correct what they say are errors related to their loans.

The New York attorney general had also objected on grounds that the sales would strip households of claims or defenses that would help them save their homes from wrongful foreclosures.

Garrity wrote in his decision that Ditech failed to satisfy sections of the bankruptcy code by limiting homeowners’ ability to assert their rights against the buyer, as well as other issues. “For those reasons, the Debtors’ request for confirmation of the Second Amended Plan is denied,” Garrity wrote in his decision.

Ditech has signed agreements to sell its mortgage servicing rights to New Residential Investment Corp. -- which is managed by Fortress Investment Group LLC -- for about $1 billion and to sell its reverse mortgage business to Mortgage Assets Management LLC, which is affiliated with Waterfall Asset Management LLC.

More than 4,000 homeowners have complained to federal agencies in the past year that Ditech failed to properly credit payments and wrongly foreclosed on their homes. Company lawyers said the buyers would only complete the transactions if they were unencumbered by consumer claims.

Ditech filed for bankruptcy in February with a plan to cut more than $800 million in debt and continue operations as it sought options that included a sale of the company.

To contact the reporter on this story: Josh Saul in New York at jsaul15@bloomberg.net

To contact the editors responsible for this story: Rick Green at rgreen18@bloomberg.net, Boris Korby, Dawn McCarty

©2019 Bloomberg L.P.