Donnell Harris, Stephanie Williams, and their children were one of the plaintiff families moved from rec centers in an earlier court case.

The city must cease sheltering homeless families at recreation centers and move them to apartment-style shelter or private rooms, a judge ruled today.

Facing overflowing shelters this frigid winter, the District—-obligated by law to provide shelter to homeless families when temperatures with windchill drop below freezing—-has turned to the rec centers for shelter on cold nights. But families there have alleged that the partitioned spaces in the rec centers don’t allow for privacy or constitute the private rooms the city is required to provide for homeless families in the absence of available apartment-style shelter.

D.C. Superior Court Judge Robert D. Okun sided with the families today, issuing a preliminary injunction against the use of the rec centers until the full case is heard and decided, likely later this year.

Appearing before Okun on Friday, city attorneys argued that they would be unable to find adequate shelter for the families if Okun issued a preliminary injunction. But Okun stated today that the city’s expense and challenge in housing the families was “far outweighed by the danger of irreparable harm to the plaintiffs” if an injunction were not issued.

Following the ruling, city attorney Kim Katzenbarger said it would be “impossible for the District to comply” with the ruling for lack of available space in city-owned buildings or hotels, raising the possibility that the District would be held in contempt of court for not moving the families tonight, when subfreezing temperatures are again expected. Okun denied Katzenbarger’s request for a stay pending the appeal the city plans to file.

Several homeless families were present for the ruling, and rejoiced after it was issued. “Thank God!” exclaimed Stephanie Williams, a homeless mother of two. “Amen.”

Williams, her husband, and her children were one of four families already moved from the rec centers to hotel rooms as a result of a temporary restraining order issued earlier this month by another judge. But that order applied only to the families listed as plaintiffs. Today’s ruling, following a request by the families’ lawyers, applies to the full class of current and future homeless families.

Williams expressed joy on the behalf of the families she got to know at the rec centers, who will no longer have to stay in the subpar conditions they’ve complained of there. “They don’t have to go back to the rec anymore,” she said. “Don’t have to suffer.”