Mayor Sylvester Turner is claiming victory in a court battle over Houston's desire to clean up homeless encampments.

The ACLU had asked for a temporary restraining order to block the city from enforcing a ban on camping in public places. The city argued the camps had become a public health hazard.

The ACLU says the ban infringed on the rights of the homeless.

Related: Federal court issues temporary restraining order against city in homelessness lawsuit

“I'm grateful that the judge has for now essentially endorsed the city's effort to strike a balance between preserving personal freedoms of every Houstonian and eliminating threats to public health that have developed at and near encampments on public property in the center of the city,” Turner said in a statement.

The judge wrote that testimony presented by the city's legal department “establishes that allowing the encampments to continue in their current condition poses a greater detriment to the city and its residents more so than any harm that may result from the City's enforcement of the ordinance.”

The ordinance makes using tents and similar temporary structures for living accommodations on public land a misdemeanor.