Bank of Scotland has been unfairly double-billing customers who fell behind on their mortgages, a High Court judge has ruled.
Master Ellison said the bank's behaviour had been unconscionable.
His finding in a Belfast courtroom could have implications for thousands of mortgage holders across the UK, the charity which took the case said.
Master Ellison said: "The plaintiffs' reliance on extinguished arrears may fairly be described as double-billing. Unilateral consolidation with double billing creates very real problems for borrowers, their advisers and the court.
"To the extent at least of the double billing, it is unconscionable."
The Housing Rights Service which supports distressed borrowers challenged how the lender was dealing with mortgage arrears, in conjunction with three customers facing repossession.
The bank had added their arrears to outstanding mortgage balances without the customers' consent.
This produced increased mortgage payments, meaning customers were effectively paying off their arrears.
The bank then proceeded with legal action to repossess the properties and asked the customers to make additional payments towards the arrears to avoid losing their homes.
Master Ellison said: "The plaintiff is, as it were, having its cake and eating it. There may not be fraud involved, but I would certainly not regard this as fair accounting."
Housing Rights Service uncovered the issue when a number of customers contacted its mortgage debt advice service. Advisers notice a pattern of unexplained increases in mortgage payments despite there being no rise in the bank's interest rates.
The court stated that the capitalisation of the arrears by adding them to customers' bills resulted in them being extinguished and as such it should not be permissible to rely on such arrears to justify repossession legal proceedings.
It found that the practice of Bank of Scotland distorted the borrowers' perception of affordability. That was because they faced increased monthly payments reflecting the arrears plus a demand for immediate payment of the arrears.
The judge said this made it impossible for the court to define or ascertain the period within which any payment proposal by borrowers would clear the arrears.
"The plaintiffs' stance is one of extremely select subjectivity. It has somehow turned a tool of forbearance into its opposite."
He said he was imposing a series of strict conditions on the bank if it tried to enforce any suspended repossession orders.
He added that if the bank failed to meet these conditions, it "may face an uphill struggle".
Christopher McGrath, solicitor with the Housing Rights Service, said the law provides protection to borrowers by allowing the court discretion to stop repossession action when a borrower can put forward a payment arrangement.
He added: "However the actions of Bank of Scotland distorted this discretion.
"It is our view that this practice unfettered would undoubtedly have resulted in many borrowers unnecessarily losing their homes."
Bank of Scotland is a subsidiary of the Lloyds Banking Group.
A Lloyds Banking Group spokeswoman said: "We encourage customers to contact us at the earliest opportunity if they believe that they will be unable to make their monthly mortgage payment.
"Repossession is always the last resort and we work hard to ensure that we are providing customers facing financial difficulty with the right support to help ease their circumstances and ultimately help to resolve the situation.
"We are currently considering the Northern Ireland High Court judgment made on 4th August and our position following that judgment.
"Once we have fully reviewed the findings, we will respond accordingly."