A mortgage lender participating in New Jersey’s foreclosure mediation program may not unilaterally modify the terms of a mediated settlement designed to keep the homeowner in his or her home, the state Supreme Court ruled on Monday.

In a unanimous ruling, the court found that a lender, GMAC Mortgage LLC, violated the terms of the judiciary’s Residential Mortgage Foreclosure Mediation Program when it repeatedly modified the terms of an agreement it had reached with one of its borrowers—who eventually lost her home even though she never agreed to the modifications.