As migrants from Latin America poured into New York City this spring, the city tried to make space for them in its homeless shelters. It was not enough.

In August, as Gov. Greg Abbott of Texas sent buses of migrants directly to the city’s main bus terminal, New York’s mayor, Eric Adams, started opening new shelters at a frantic pace: nearly two dozen in six weeks. Fifteen just in the past week. It has not been enough.

On Thursday, as the number of migrants in shelters soared above 10,000, Mr. Adams announced that the city would open emergency centers to temporarily house the new arrivals — including several barrackslike, winterized tents the size of airplane hangars that will shelter single adults at a parking lot in the Bronx.

“This is not an everyday homelessness crisis, but a humanitarian crisis that requires a different approach,” he said in a statement.

The population of the city’s main homeless shelter system is climbing faster than at any time in recent memory. Since mid-May, it has jumped by more than 25 percent, to nearly 58,000. In the past, it took years for such large increases to take place.

Just in the last week, the shelter population has grown by more than 2,200.

The speed at which migrants are arriving is only part of the problem. The city is also contending with decisions to close some buildings used to house homeless people and with hurdles to opening and operating shelters that have bedeviled mayors for decades.

New York is the nation’s only city that is legally required to provide a “right to shelter” for anyone in the city who needs a bed. Mr. Adams said last week he wants to reassess the ways in which the city satisfies that right, but he said turning away the migrants is not an option.

The city must be “creative” in finding ways to house the migrants, he said this week.

As recently as 2019, the city’s homeless shelters held 4,000 more people than they do now, without having to resort to tents or — as Mr. Adams said he was considering earlier this week — cruise ships. But it is impossible to simply turn the clock back to 2019.

The speed of the influx poses such a challenge because the shelter system is a collection of over 300 buildings of widely varied use, configuration and condition. The vast majority of them are rented from private landlords and operated by dozens of nonprofit groups.

Turning a building into a homeless shelter is not a simple process, either. It can involve extensive modification and require approvals from a host of city and state agencies.

The flow of migrants began to increase shortly after Mayor Bill de Blasio’s administration had completed an effort to stop using hundreds of substandard shelter buildings. The city halted the use of hotels to house families with children. It removed from its shelter portfolio more than 3,600 apartments that lack the services many homeless people need and turned over 1,200 of them into permanent housing for the homeless.

Mr. de Blasio’s plan called for opening 90 dedicated shelter buildings by the end of next year. Dozens have yet to open, many of them delayed for various reasons. Some were canceled because of community opposition.

The migrants arrived at a moment when the city shelter population had fallen to its lowest level in a decade. The drop was concentrated in the family shelters. A pandemic eviction moratorium that lasted two years kept thousands of people from losing their apartments, and as the city saw the need for family shelters decrease, it closed them.

The moratorium ended in January, and in mid-April, the numbers started to climb.

The Coalition for the Homeless, a nonprofit that monitors conditions in the shelters by court decree, noticed the change and urged the city to expand capacity. “We needed there to be enough cushion in the system to accommodate new entrants on very short notice,” said Jacquelyn Simone, policy director for the coalition.

Most of the migrants are families with children. The city now finds itself renting out hotels for them again.

The space crunch is exacerbated by another problem: The city has been taking longer and longer to move people from shelter to permanent housing. The average length of stay in a family shelter increased to 534 days in fiscal year 2022 from 443 days in fiscal year 2020. Most of the migrants do not qualify for housing subsidy programs because of their immigration status, a fact that is now compounding this delay.

All this is happening as the city faces a potential budget crisis. Last week, Mr. Adams ordered agencies to cut their city-funded expenses by 3 percent this year. It typically costs between $135 and $190 per day to house someone in a shelter, and the bill could run into hundreds of millions of dollars. The city has asked the state and federal government for help.

On Thursday, officials offered a few basic details about the two “emergency response and relief centers” it plans to build.

The first, for single adults, mostly men, will house 1,000 people in five long tents set up in a parking lot at Orchard Beach in the Bronx. The city distributed a photo of another emergency shelter as an example of the design: dozens of cots lined up in rows.

The layout of the second center, for families with children, is still being determined. The city is required to give each family its own room.

Both centers are intended to be temporary stops, offering dining halls, showers, medical and mental health providers and legal information. The city intends to keep people at the centers for no more than four days.

Kathleen Cash, an advocate at the Safety Net Project of the Urban Justice Center, called the pictures of what the centers might look like “devastating.”

“Opening short-term municipal refugee camps through a separate city bureaucracy — while the mayor has repeatedly failed to honor the right to shelter, and has announced plans to ‘reassess’ it — is the kind of approach many feared this administration would take,” she said.

The mayor described the efforts differently. “Like the generations that came to our city before,” Mr. Adams said in his statement, “New York will provide the thousands now coming to our city with the foundation to build a better life.”