WASHINGTON — Homelessness in the United States continued to rise this year, driven by soaring rates of homelessness in California, according to a new federal report that could prompt long-promised action for people living in the streets of Los Angeles and San Francisco.

Homelessness rose 2.7 percent from 2018 to 2019, according to the annual assessment by the Department of Housing and Urban Development. That figure was pulled upward by a 16.4 percent increase in homelessness in California, which is struggling with out-of-reach housing costs and intractable fights over affordable housing construction.

A summary of the report was first published by The Associated Press.

Ben Carson, the secretary of housing and urban development, blamed welfare programs that he said fostered dependency and despair. On President Trump’s favorite cable program, “Fox & Friends,” on Friday, Mr. Carson said policies that allowed people to sleep on streets, bridges and other public places were not compassionate.

Such policies are creating a “health hazard,” he said, discouraging homeless people from going “to the places that are actually designed to help them get out of that situation.”