A homelessness official fired by the Trump administration last month amid a dispute over White House proposals to address California’s homeless population was hired on Wednesday to advise the state’s governor, who has repeatedly clashed with the president.

Gov. Gavin Newsom criticized the federal government while appointing the former official, Matthew Doherty, who had served as the director of the United States Interagency Council on Homelessness during the Obama and Trump administrations.

For months, President Trump has hammered California’s leadership — Mr. Newsom in particular — over the state’s homelessness problem. Mr. Doherty was fired last month after reported clashes with the president’s team over potential actions in California, including a controversial proposal to move homeless people into unspecified federal facilities.

“We can’t let Los Angeles, San Francisco and numerous other cities destroy themselves by allowing what’s happening,” the president said in September.