WASHINGTON — The U.S. Supreme Court on Monday left a lower court ruling in place that struck down a law making it a crime to sleep in public places when homeless shelter space is unavailable.

A federal appeals court had ruled that the anti-camping ordinance in Boise, Idaho, was cruel and unusual punishment, violating the Constitution's Eighth Amendment. "A state may not criminalize conduct that is an unavoidable consequence of being homeless," the appeals court said.

The Supreme Court denied Boise's appeal Monday without comment, as is its normal practice when declining to grant reviews.

Lawyers for the city argued that Boise wanted to enforce the ordinance "in the parks, foothills, and other public areas not just to keep them safe and sanitary but also to allow users to utilize the public spaces as they were intended to be used." Supporters of the law said people sleeping on the streets are unsafe and make residents feel less safe.

In asking the Supreme Court to take the case, Boise's lawyers said the appeals court ruling that invalidated the ordinance created "a de facto right to live on sidewalks and in parks" and said it would cripple the ability of more than 1,600 communities in Western states to enforce similar laws.

But challengers of the law said the appeals court ruling simply blocked Boise from charging homeless people with a crime for sleeping outside when no shelter space was available. The appeals court affirmed "the ought-to-be uncontroversial principle that a person may not be charged with a crime for engaging in activity that is simply a universal and unavoidable consequence of being human,” they said.

The U.S. Department of Housing and Urban Development estimates that half a million people are likely to be homeless on any given night. A study by the U.S. Interagency Council on Homelessness found that 42 percent of homeless people sleep in public locations such as under bridges, in parks, or on the sidewalks.