LOS ANGELES — Flooded with homeless encampments from its freeway underpasses to the chic sidewalks of Venice Beach, municipal officials here declared a public emergency on Tuesday, making Los Angeles the first city in the nation to take such a drastic step in response to its mounting problem with street dwellers.

The move stems partly from compassion, and in no small part from the rising tide of complaints about the homeless and the public nuisance they create. National experts on homelessness say Los Angeles has had a severe and persistent problem with people living on the streets rather than in shelters — the official estimate is 26,000. The mayor and City Council have pledged a sizable and coordinated response, proposing Tuesday to spend at least $100 million in the next year on housing and other services. They plan, among other things, to increase the length of time shelters are open and provide more rent subsidies to street people and those in shelters.

“Every single day we come to work, we see folks lying on this grass, a symbol of our city’s intense crisis,” Mayor Eric Garcetti said at a news conference at City Hall on Tuesday. “This city has pushed this problem from neighborhood to neighborhood for too long, from bureaucracy to bureaucracy.”

In urban areas, including New York, Washington and San Francisco, rising housing costs and an uneven economic recovery have helped fuel a rise in homelessness. In some cities, officials have focused much of their efforts on enforcement policies to keep people from living in public spaces.