SANTA BARBARA, Calif. — President Trump’s emerging plan to address California’s homeless crisis includes ideas that have been tried unsuccessfully before, namely the mass housing of people living on the streets, and proposals that have been ruled illegal by federal courts.

The White House effort has taken state officials by surprise, as the president has shifted from criticizing California’s management of homelessness on social media to proposals that would insert the federal government directly into the crisis, including relocating homeless people living on the street and in tent camps to a federal facility.

But the state’s growing homeless problem hasn’t been contained by similar policy initiatives in the past. It is an unusual crisis stemming in part from the state’s economic success and one where the lack of political will, rather than a lack of public resources, is often the primary obstacle to resolving it.

About 140,000 people in California are without permanent housing, roughly a quarter of the country’s total homeless population. The numbers are rising fast, driven by the highest housing costs in the nation, enduring mental health and substance abuse issues, and legal barriers that prevent authorities from simply removing people from the streets, even those who cannot take care of themselves.

Angry local politics has also emerged around the issue. In recent months, residents have organized against plans for neighborhood homeless shelters, from once-solidly conservative Orange County to the liberal Bay Area. Local ballot measures approved in recent years to raise money to address homelessness have become tangled in legal challenges.

“I am wary because every time this president does anything involving people who are vulnerable, they are the ones who get hurt,” said Sacramento Mayor Darrell Steinberg (D), who is chairman of the state Commission on Homelessness and Supportive Housing. “And yet, that being said, we have an obligation to better understand if there are federal resources out there to help address California’s homeless problem.”

The Trump administration’s proposal, as it has been outlined by advisers, would do little to alter the challenging local politics or the legal protections that allow people to sleep on California’s streets.

The president’s domestic policy advisers have been discussing options to clear what are often highly unsanitary streetside homeless camps. Earlier this week, administration officials toured an unused Federal Aviation Administration building in California, presumably as a possible shelter site.

Trump has expressed particular interest in Los Angeles, where 60,000 people live without permanent housing, nearly half of them outdoors. At the same time, he has proposed reducing the Department of Housing and Urban Development budget by 18 percent from the previous year, a deep cut to the agency primarily responsible for helping cities pay for and subsidize affordable housing.

Los Angeles has roughly 10,000 emergency shelter beds, about a third of the number needed for those who live on the street daily. Mayor Eric Garcetti (D), who has budgeted $457 million this year to address homelessness, has called the issue “the humanitarian crisis of our time.”

Even with the additional shelter space the FAA building might provide, city officials would face the challenge of getting homeless residents to use it. One Trump administration official said Wednesday, “We’re not rounding up anyone or anything yet.”

Homeless camps, including the large one in the city’s skid row district, develop their own cultures. Often residents have pets that amount to family members, which not all shelters allow. Couples who live together in the camps face separation in shelters divided by gender.

“Much of what has been discussed is illegal on its face,” said Michael McConnell, a homeless advocate in San Diego, where a hepatitis A outbreak afflicted the homeless population in 2017 and attracted national attention to the public health risks associated with the issue. “This has been tried over and over and over again, and it still is in places like San Diego.”

San Diego is the only major California city with a Republican mayor, Kevin Faulconer, who opened three large tents downtown to house the homeless after the hepatitis A epidemic.

Two tents remain open after one reserved for women and children was closed and relocated. The two tents provide about 500 beds. A 2019 homeless census counted more than 2,600 people in the city without shelter, an increase from the previous year.

McConnell said the city continues to rely on methods that “criminalize” homelessness. The city’s tactic of issuing public nuisance tickets and fines has not led to a decrease in the homeless population, as the recent census showed, but pushed them into more remote parts of the city.

“We invest a lot in the front end — storage for homeless belongings, safe-parking areas, tents — but we’re not increasing funds at the back end to get people out of these beds and into housing,” ­McConnell said. “I hope Trump isn’t looking at us as a model. The example we are is how to hide homeless people.”

Authorities have limited legal options to force homeless residents into shelters. Many cities have passed “anti-camping” laws that make it illegal for people to sleep on public streets, a lightly disguised tool used by authorities to arrest homeless residents.

But the U.S. Court of Appeals for the 9th Circuit last year essentially invalidated those laws. Siding with six homeless people in Boise, Idaho, the court ruled that it was unconstitutional to arrest people living on the streets if they had no place else to go, including shelter beds.

The ruling frustrated many big-city mayors in California. Later this month, the city and county of Sacramento are expected to sign on to an amicus brief supporting a legal challenge to the ruling now before the U.S. Supreme Court.

Steinberg, the Sacramento mayor, opposes overturning the ruling. In a quirk of Sacramento’s city government, the city attorney has the authority to support such briefs without the mayor or council’s approval.

“What California needs is a public policy that says people should live indoors,” said Steinberg, whose city has a large deficit of shelter beds. “That must be our North Star, and from there, we can get people the support and services they need. Providing that gives us the moral high ground to say there will be no camping.”

About a third of the state’s homeless population suffers from mental illness, surveys have found, but government officials have a limited ability to force them into shelters or treatment.

In San Francisco, the Board of Supervisors passed a measure this summer, after months of contentious debate, that would allow police to take into custody only the city’s most severely mentally ill homeless residents, a number that estimates place at fewer than 20 people. There are more than 30,000 homeless in the Bay Area, according to estimates.

“What would help would be federal investment in helping prevent people from becoming homeless, not warehousing human beings or hiding them from public view,” said Libby Schaaf, the mayor of Oakland, which has the highest rate of homelessness of any major California city.

Schaaf (D) said if Trump were serious about helping solve the problem, rather than using it to criticize what he has called failed liberal policies, he would reverse years of cuts to federal housing and mental-health programs.

“His track record of vilifying and harming the most vulnerable populations is clear,” Schaaf said. “It is hard to believe that his interests in this is sincere or will be effective.”

Increasingly, as the crisis becomes more visible on the streets, state and city officials are allocating more money for homeless services and housing.

In his first budget, Gov. Gavin Newsom (D) doubled the amount the state will spend this year to address homelessness to $1 billion. His spokesman, Nathan Click, said the governor would welcome a serious discussion with Trump about a larger federal role in addressing the crisis.

At the same time, California voters have approved measures to raise money for homeless initiatives. But the funds have been slow in showing results.

In 2016, Los Angeles voters approved a $1.2 billion bond measure that would finance an estimated 10,000 new affordable housing units for the homeless.

A new $52 million homeless complex funded by the measure opened earlier this year, providing permanent or so-called bridge housing for nearly 300 people. But city officials say it will be difficult to achieve the overall goal, slowed by neighborhood opposition to such housing projects and other issues.

A tax on large businesses approved last year by San Francisco voters to raise $300 million for homeless services has met even more resistance. Two state business groups and an anti-tax association have filed suit to overturn the measure.

Steinberg said that a member of the homeless task force accurately summarized the politics around homelessness by saying, “The only thing people oppose more than homelessness are the solutions to homelessness.”

“The opposition to many of these projects and initiatives is real, but it is our job to forge through this,” he said. “People have to realize the problem is already in their backyard.”