Civil rights groups warned that Friday’s ruling by the U.S. Supreme Court upholding the constitutionality of punishing people for sleeping outdoors would exacerbate homelessness, while some politicians welcomed the power to clear the tent encampments that are being seen increasingly across the country.

The court’s six-strong conservative majority found that ordinances that punish people for sleeping rough even when there are no shelter beds available do not violate the U.S. Constitution’s prohibition on “cruel and unusual” punishments.

Organizations that advocate for homeless people said the ruling in Grants Pass v. Johnson, which also cited and criticized a related case known as Martin v. Boise, criminalized homelessness and poverty in the many American cities that have a dearth of affordable housing. Some 600,000 people are homeless on any given night in the U.S., according to government estimates.

As the court noted, the states with the highest rates of unsheltered homelessness – California, Oregon, Hawaii, Arizona, and Nevada – lie in the West, where both the Grants Pass and Boise cases originated before heading to the San Francisco-based 9th U.S. Circuit Court of Appeals.

“Today’s ruling is shameful and it will undoubtedly make homelessness worse,” Jesse Rabinowitz, the campaign director of the Washington-based non-profit the National Homelessness Law Center, said in an interview. “We know that throwing homeless folks in jail or giving them hundreds of thousands of dollars in tickets keeps them forever trapped in a cycle of poverty and homelessness.”

He said that just because the Supreme Court said cities and lawmakers could punish homeless people for sleeping outdoors it does not mean that they should. In the court’s majority opinion, Justice Neil Gorsuch wrote: “Nothing in today’s decision prevents states, cities and counties from going a step further and declining to criminalize public camping altogether.”

Gorsuch said jurisdictions have a range of policies with which to address homelessness, including building more affordable housing and shelters as well as enacting camping bans.

Some politicians who contend with large encampments in western cities said the ruling brought legal clarity to the policies they could use to clear encampments they viewed as unsafe.

California Governor Gavin Newsom, a Democrat, was among the leaders who had supported officials in Grants Pass, a small city in Oregon, as they sought to defend their policy of fining people $295 for sleeping in public with a blanket or pillow, and jailing repeat offenders for up to 30 days.

“This decision removes the legal ambiguities that have tied the hands of local officials for years and limited their ability to deliver on common-sense measures to protect the safety and well-being of our communities,” Newsom said in a statement.

In contrast, Los Angeles Mayor Karen Bass, a Democrat, said the ruling was disappointing, and echoed calls by advocacy groups for more affordable housing.

“This ruling must not be used as an excuse for cities across the country to attempt to arrest their way out of this problem or hide the homelessness crisis in neighboring cities or in jail,” Bass, the mayor of California’s largest city, said in a statement.

In his statement welcoming the court’s opinion, Newsom also noted his state’s spending aimed at getting people out of “dangerous encampments” and into housing.

The National Homelessness Law Center said it was urging the U.S. government to invest $365 billion on increasing access to affordable housing, including rental assistance for the poorest households.

Ed Johnson, the litigation director of Oregon Law Center who represented the people suing the city of Grants Pass, said the only solution to the homelessness crisis was affordable housing.

“The legal fight on this issue will continue today and every day until cities stop punishing their homeless residents for trying to survive,” he said.