(Reuters) - The U.S. Supreme Court on Monday refused to hear Boise’s defense of its policy of sometimes prosecuting homeless people for sleeping in public after a lower court found ordinances in Idaho’s capital violated the U.S. Constitution’s bar on cruel and unusual punishment.

Slideshow ( 2 images )

The justices left in place a 2018 ruling by the San Francisco-based 9th U.S. Circuit Court of Appeals that fining or jailing homeless people for staying outside or in unauthorized places if a bed at an emergency shelter is not available is unconstitutional. The city had appealed that ruling, arguing that the decision threatened public health and safety.

U.S. cities have struggled over the years with how to address the issue of homelessness, putting in place various local laws.

The case centered on two Boise ordinances that prohibited camping or “disorderly conduct” by lodging or sleeping in public. The city said it needed to enforce the ordinances to prevent the formation of encampments that can lead to unsanitary conditions and crimes such as drug dealing and gang activity, and to keep public spaces accessible for residents, visitors and wildlife.

Six current or former homeless Boise residents who were prosecuted under the ordinances - Robert Martin, Robert Anderson, Lawrence Lee Smith, Basil Humphrey, Janet Bell and Pamela Hawkes - sued the city in federal court in 2009, arguing that the laws violated their constitutional rights.

Each had been fined between $25 and $75. Five of them were sentenced to time served, while one twice served a single day in jail.

The 9th Circuit ruled that the Constitution’s Eighth Amendment, which bars cruel and unusual punishment, prohibits punishing homeless people if there are more of them than there are available shelter beds. The ruling allowed the plaintiffs to seek an injunction against enforcement of the city’s ordinances.

“As long as there is no option of sleeping indoors, the government cannot criminalize indigent, homeless people for sleeping outdoors, on public property, on the false premise they had a choice in the matter,” the appeals court said.

Boise said it does not issue citations if the city’s three homeless shelters are full. The plaintiffs said that the two Christian-based shelters have policies to never turn away anyone for lack of space, and so police have continuously enforced the ordinances.

The 9th Circuit noted that those facilities could still refuse to shelter homeless people who exceed limits of the number of days they can stay or who object to mandatory religious programs.

In appealing to the Supreme Court, Boise said the 9th Circuit’s “far-reaching and catastrophic” decision will undercut the ability of municipalities to maintain health and safety and imperil other laws such as those against public defecation and urination.

The plaintiffs called the city’s arguments “dramatically overwrought.”