WASHINGTON -- The U.S. Supreme Court wrestled with major questions about the growing issue of homelessness on Monday as it considered whether cities can punish people for sleeping outside when shelter space is lacking.

It's the most significant case before the high court in decades on the issue, and comes as record numbers of people are without a permanent place to live in the United States.

The case started in the rural Oregon town of Grants Pass, which began fining people US$295 for sleeping outside as the cost of housing escalated and tents sprung up in the city’s public parks. The San Francisco-based U.S. 9th Circuit Court of Appeals struck down the law under its holding that banning camping in places without enough shelter beds amounts to cruel and unusual punishment.

The justices appeared to be leaning toward a narrow ruling in the case after hearing arguments that showed the stark terms of the debate over homelessness in Western states like California, which is home to one-third of the country's homeless population.

Sleeping is a biological necessity, and people may be forced to do it outside if they can't get housing or there's no space in shelters, Justice Sonia Sotomayor said.

“Where do we put them if every city, every village, every town lacks compassion and passes a law identical to this? Where are they supposed to sleep? Are they supposed to kill themselves, not sleeping?" she said.

Solving homelessness is a complicated issue, said Justice Brett Kavanaugh. He questioned whether ticketing people for camping helps if there aren't enough shelter beds to hold everyone, but also raised concerns about federal courts “micromanaging” policy.

Other conservative justices asked how far Eighth Amendment legal protections should extend as cities struggle with managing homeless encampments that can be dangerous and unsanitary.

“How about if there are no public bathroom facilities, do people have an Eighth Amendment right to defecate and urinate outdoors?” said Justice Neil Gorsuch.

Other public-health laws cover that situation, Justice Department attorney Edwin Kneedler said. He argued people shouldn’t be punished just for sleeping outside, but said the ruling striking down the Grants Pass law should be tossed out because the court didn't do enough to determine if people are “involuntarily homeless.”

Gorsuch and other justices also raised the possibility that other aspects of state or federal law could help sort through the issue, potentially without setting sweeping new legal precedent.

The question is an urgent one in the West, where a cross-section of Democratic and Republican officials contend that the 9th Circuit's rulings on camping bans make it difficult for them to manage encampments. The appeals court has jurisdiction over nine states in the West.

Advocacy groups, on the other hand, argued that allowing cities to punish people who need a place to sleep will criminalize homelessness and ultimately make the crisis worse as the cost of housing increases.

Hundreds of demonstrators gathered outside the Supreme Court Monday morning to advocate for more affordable housing, holding silver thermal blankets and signs like “housing not handcuffs.”

Homelessness in the United States grew a dramatic 12 per cent last year to its highest reported level, as soaring rents and a decline in coronavirus pandemic assistance combined to put housing out of reach for more people.

More than 650,000 people are estimated to be homeless, the most since the country began using the yearly point-in-time survey in 2007. Nearly half of them sleep outside. Older adults, LGBTQ2S+ people and people of color are disproportionately affected, advocates said.

In Oregon, a lack of mental health and addiction resources has also helped fuel the crisis. The state has some of the highest rates of homelessness and drug addiction in the nation, and ranks near the bottom in access to treatment, federal data shows.

The court is expected to decide the case by the end of June.

Rush reported from Portland, Oregon.