A federal judge has put a temporary halt to a Houston homeless ordinance banning public camping after ruling the law may criminalize the status of people who can’t find permanent shelter.

Senior U.S. District Judge Kenneth Hoyt signed a temporary restraining order on Aug. 22 that prevents the city from enforcing the camping ban as Houston promises to build more housing for the homeless and reduce aggressive panhandling in the city.

The ACLU filed the complaint challenging City of Houston’s ordinance earlier this year on behalf of hundreds of homeless people. They sought the TRO from Hoyt after Houston police last week began issuing written notices to homeless people who were camping in public.

In the order, Hoyt noted that protected basic shelter is a basic human necessity—a point the City of Houston did not challenge. But the city also did not challenge the fact that all of its homeless shelters are full.

“The plaintiffs have demonstrated that they are subject to a credible threat of being arrested, booked, prosecuted and jailed for violating the City of Houston’s ban on sheltering in public,” Hoyt wrote. “The evidence is conclusive that they are involuntarily in public, harmlessly attempting to shelter themselves—an act they cannot realistically forgo, and that is integral to their status as unsheltered homeless individuals.”

“Enforcement of the city’s ban against the plaintiffs may, therefore, cause them irreparable harm by violating their Eighth Amendment right to be free from cruel and unusual punishment due to their status of ‘homelessness,’” Hoyt wrote, temporarily banning the city from enforcing the ordinance while the parties continue litigating the case.

Trisha Trigilio, a senior staff attorney for the ACLU of Texas, was happy with Hoyt’s decision.

“We’re delighted the court recognized that homelessness is not and should not be a crime,” Trigilio said. “Seeking shelter is not only a right; it’s also a fundamental human necessity. We call on the city to stop enforcing ordinances that criminalize such a basic human need and seek more compassionate and effective methods for solving Houston’s homelessness problem.”

Houston Mayor Sylvester Turner was disappointed in the ruling. He said the ordinance was intended to take vulnerable people from the streets and place them in permanent housing.

“I think we can all agree that no one deserves to live in an environment that has been deemed a public health hazard,” Turner said.

“It is our hope that the court will ultimately conclude that the city of Houston has the right to manage public space by regulating what can be erected there, especially when items impede on the space and pose risks,” he said. “We will continue to work to find affordable housing options for our neighbors in need.”