LOS ANGELES — Members of the Trump administration visited Los Angeles on Tuesday to get a firsthand look at the city’s sprawling homeless encampments and efforts to control them, while President Donald Trump directed his staff to develop policy options to address the national crisis of people living on the streets.

The visit by a delegation from several federal agencies came about two months after the Republican president called the homelessness crisis in Los Angeles, San Francisco and other big cities disgraceful and faulted the “liberal establishment” for the problem.

In July, Democratic Mayor Eric Garcetti issued a public invitation for the Republican president to walk the streets with him and see the suffering and squalid conditions. The mayor released a letter to Trump on Tuesday saying he looked forward to working together, but tensions between the White House and officials in heavily Democratic California were also on vivid display.

Gov. Gavin Newsom has sparred with the White House routinely, and his office released a statement Tuesday saying the state was ready to discuss serious proposals but Trump “could start by ending his plans to cut food stamps, gut health care for low-income people and scare immigrant families from accessing government services.”

San Francisco Mayor London Breed said in a statement that the city would welcome assistance from the federal government to build more housing “but simply cracking down on homelessness without providing the housing that people need is not a real solution.”

Garcetti, too, said he was ready to talk but wrote that “the federal government has woefully underfunded our housing safety net, contributing to homelessness” and slashed funding for new housing.

“We must put politics aside,” he wrote.

And at an event Monday in Beverly Hills, sponsored by the website Politico, Garcetti’s chief of state and federal affairs, Breelyn Pete, said the city looked forward to explaining its homeless strategy to administration officials but added, “They’re just not thoughtful, and quite frankly not smart enough, to know what we’re doing.”

Trump would make an unlikely pairing with the Los Angeles mayor, who comes from a heavily Democratic state recognized as the center of the so-called Trump resistance. Trump lost California to Hillary Clinton in the 2016 election by over 4 million votes.

White House spokesman Judd Deere echoed Trump’s earlier remarks linking homelessness with liberal policies, saying “the president has taken notice of the homelessness crisis, particularly in cities and states where the liberal policies of overregulation, excessive taxation, and poor public service delivery are combining to dramatically increase poverty and public health risks.”

Like many big cities, Los Angeles has struggled with homelessness for decades, and the population on the streets has grown despite a robust economy. Filthy, drug-infested encampments line downtown streets, and homeless people often sprawl on the lawn of City Hall, with tents nearby. The mayor says 36,000 people in the city are homeless on any given night.

Figures released in June showed a 16% jump in Los Angeles’ homeless population over the last year. The jump came after the mayor helped convince voters in 2016 to borrow $1.2 billion to construct housing for the homeless.

The mayor’s office said the federal group visited several homelessness projects, including a recently opened shelter.

On Tuesday, Sacramento County and the city of Sacramento joined the fight to overturn a federal court ruling barring municipalities from prosecuting homeless people for sleeping on the streets if there are no available shelter beds, The Sacramento Bee reported .

The Trump administration provided no specifics on what its national homeless policy would entail.

Taylor Griffin, a spokeswoman for House Speaker Nancy Pelosi, said, “Homelessness is a challenge to the conscience of our nation and a growing humanitarian crisis for communities across our country. The Trump Administration’s heartless policies have only exacerbated the matter.”