On Monday, the Supreme Court announced it would not review City of Boise vs. Martin, a 2018 ruling handed down by the San Francisco-based U.S. 9th Circuit Court of Appeals. In Martin, the appeals court struck down prohibitions on sleeping and camping in public that the Idaho city had enacted to address homelessness. Boise’s ordinances did not pass constitutional muster, according to the 9th Circuit, because they inflicted “cruel and unusual punishment” on that city’s homeless population.

By allowing Martin to stand, the Supreme Court leaves local officials powerless to stop the expansion of homeless encampments. In many West Coast cities, the burgeoning number of tents have left sidewalks in some neighborhoods awash in trash, human waste and used needles and have led to outbreaks of infectious diseases such as hepatitis A and C and rodent infestations.

But as notorious as the homeless crises of Los Angeles and San Francisco are, the consequences of the Martin ruling are most ominous for cities like Boise.

Under the 9th Circuit’s dubious reasoning, cities in the nine Western states covered by that court can no longer prohibit encampments unless a judge signs off on the adequacy of the local homeless services system. The ruling thereby strikes at the heart of the right to self-government. Courts can now require cities to allow homeless encampments or take on burdensome costs of providing shelter.

Officially, the 9th Circuit only struck down laws on sleeping in public when no alternative is “practically available” to the homeless. You might think from that language that a city with adequate shelter beds could ban encampments. But not necessarily.

Boise’s law explicitly forbade enforcement of its camping prohibitions if local shelters were full, and Boise’s shelters have never been full. The 9th Circuit acknowledged that fact but felt that local shelter providers’ rules and religious orientation made them inadequate to the needs of some of the local homeless population.

By the logic of Martin, any city that wants to prohibit encampments must first ask the courts not only to verify that it has enough shelter capacity for the homeless but also to assess whether local shelter programs are appropriate to the needs and desires of the local homeless population.

Counting shelter beds is much easier than counting those who are homeless. However, assessing the shelters’ conditions, rules and protocols is heavily subjective. Requiring that courts evaluate shelter programs is a mandate for ideological jurisprudence. Many shelter providers are faith-based groups. But the 9th Circuit signaled that a shelter might not be “practically available” to someone who objects to its “overall religious atmosphere.” Even less clear is the legitimacy of sobriety requirements under Martin. Sobriety requirements are life-saving for those determined to overcome their addictions but also sometimes cited by others for why they prefer to remain on the streets.

For any city that wants to prevent encampments from swelling out of control, the safest course to take, following Martin, would be a massive investment in homeless services.

That has been New York City’s approach since it granted a right to shelter almost four decades ago. New York now spends more than $3 billion annually on its homeless services system, which mainly funds shelter and programs to keep people out of shelter. That system now ranks as one of New York’s largest municipal operations and costs more than fire, libraries and parks combined.

Cities that aren’t global financial centers will be hard-pressed to back New York levels of per capita spending on the homeless population. At present, poor cities are barely keeping up with traditional obligations such as K-12 public education and infrastructure maintenance while also trying to pay down their retirement-benefit and debt commitments. Within the 9th Circuit’s jurisdiction, three cities — Vallejo, Stockton and San Bernardino — went bankrupt in the wake of the last recession. The Martin ruling is likely to lead to a future in which cities too poor to fund major expansions of homeless services are not allowed to enact laws favored by local voters to combat an explosion of encampments on public sidewalks. This is not a welcoming prospect.

The 8th Amendment’s prohibition of “cruel and unusual punishment” is a vital constitutional doctrine, but so is the separation of powers. Members of the executive and legislative branches, not the judiciary, should retain control of how much to spend on the homeless and toward what programs, as well as standards of public order.

A law enforcement response to homelessness is not a sufficient response to homelessness. But it is a necessary component of a broader, multifaceted response to the challenge.

Cities have made many mistakes on homelessness policy, but to concede that is not to say that courts know better. When policies fail, officials and the public should enjoy the privilege to debate and implement alternative courses of action. Thanks to the Supreme Court, cities have been denied the privilege of self-government when it comes to homelessness.

Stephen Eide is a senior fellow at the Manhattan Institute and contributing editor of City Journal.