WASHINGTON — The U.S. Supreme Court upheld on Friday anti-camping laws used by authorities in an Oregon city to stop homeless people from sleeping in public parks and public streets — a ruling that gives local and state governments a freer hand in confronting a national homelessness crisis. The justices ruled 6-3 to overturn a lower court’s decision that found that enforcing the ordinances in the city of Grants Pass when no shelter space is available for the homeless violates the U.S. Constitution’s Eighth Amendment prohibition on “cruel and unusual” punishments. Various jurisdictions employ similar laws. The court’s conservative justices were in the majority, while its three liberal members dissented. Justice Neil Gorsuch, who authored the ruling, wrote, “Homelessness is complex. Its causes are many. So may be the public policy responses required to address it. At bottom, the question this case presents is whether the Eighth Amendment grants federal judges primary responsibility for assessing those causes and devising those responses. It does not.” Homelessness remains a multifaceted problem for public officials in the United States as many municipalities experience chronic shortages of affordable housing. On any given night, more than 600,000 people are homeless, according to U.S. government estimates. The case focused on three ordinances in Grants Pass, a city of roughly 38,000 people in southwestern Oregon, that together prohibit sleeping in public streets, alleyways and parks while using a blanket or bedding. Violators are fined $295. Repeat offenders can be criminally prosecuted for trespassing, punishable by up to 30 days in jail. Advocates for the homeless, various liberal legal groups and other critics have said laws like these criminalize people simply for being homeless and for actions they cannot avoid, such as sleeping in public. They point to a 1962 Supreme Court ruling that the Eighth Amendment barred punishing individuals based on their status rather than their conduct. A point of contention during the Supreme Court’s arguments in the case in April was whether homelessness can be deemed a status that would prohibit enforcing local laws. President Joe Biden’s administration agreed with the plaintiffs that Grants Pass cannot enforce an “absolute ban” on sleeping in the city — which effectively criminalizes homelessness — but suggested the rulings by the lower courts against the city were too broad and should be reconsidered. Proponents including various government officials have called such laws a necessary tool for maintaining public safety. The case, which began in 2018, involved three homeless people who filed a class-action lawsuit seeking to block the measures impacting them in Grants Pass. One of the plaintiffs has since died. U.S. Magistrate Judge Mark Clarke ruled that the city’s “policy and practice of punishing homelessness” violates the Eighth Amendment and barred it from enforcing the anti-camping ordinances. The San Francisco-based 9th U.S. Circuit Court of Appeals upheld Clarke’s injunction against the ordinances. The city had defended itself in the case in part by noting that homeless people have alternatives outside the city, including nearby undeveloped federal land, county campsites or state rest stops. The judge said that argument “sheds light on the city’s attitude towards its homeless citizens” by seeking to drive them out or punish them if they stay.