The Supreme Court on Friday allowed cities to enforce bans on homeless people sleeping outside in public places, ruling along ideological lines that such laws don’t amount to cruel and unusual punishment, even in West Coast areas where shelter space is lacking.

The case is the most significant to come before the high court in decades on the issue and comes as a rising number of people in the U.S. are without a permanent place to live.

In a 6-3 decision, the high court reversed a ruling by a San Francisco-based appeals court that found outdoor sleeping bans violate the Eighth Amendment.