Formerly homeless tenants who were placed in private apartments as part of a controversial program that the New York City government is in the process of shutting down are not protected by the state’s rent-stabilization laws, a state court judge in Brooklyn found.

The ruling is both a win for property owners across the city who own the nearly 1,800 units  used to shelter the homeless, and a blow for legal service providers who are fighting to establish tenant rights for thousands of cluster-site residents.