As his few remaining hours with a place to live ticked by last Thursday, Scott Alexander panhandled near a McDonald’s in Brattleboro, in southern Vermont, while running through a mental checklist of the supplies he would need for a move back into the woods nearby.

He had a tent and sleeping bags for himself and his wife, a propane stove and a heater. But he needed tarps and propane, and in two hours of holding his battered cardboard sign — “Any Act of Kind Greatly Appreciate” — he had made only $3.

“It feels like a countdown,” Mr. Alexander, 41, said as he eyed the storm clouds gathering overhead. “I’ll be up all night, trying to get ready.”

In the progressive bastion of Vermont, it was a point of pride that the state moved most of its homeless residents into hotel rooms during the coronavirus pandemic, giving vulnerable people a better chance of avoiding the virus.

But this month, the state began emptying hotels of about 2,800 people living there — most of them with nowhere else to go. Driven by the recent end of pandemic-era federal funding for emergency housing, the expulsions have spawned a state budget standoff and, in some quarters, painful soul searching about Vermont’s liberal values, and the limits of its good intentions.

The situation has also highlighted the growing importance of hotels in the housing crisis nationwide, for people whose other options are tents or sidewalks, and for local governments stymied by a paralyzing lack of affordable housing.

Between March 2020 and March 2023, Vermont spent $118 million in funding from the Federal Emergency Management Agency, and $190 million in federal money altogether, to house people in hotels, according to the state, broadly expanding a program that had long provided shelter in motels in snowy or frigid weather.

It was always clear that the emergency funding would end, but some saw a potentially transformative opportunity in the temporary program: a chance to draw people into stabler settings where they could be counted, connected with services and, ultimately, helped into longer-term housing.

The effort quickly revealed the extent of the state’s housing problem. In the first year of the expanded hotel program, the number of Vermonters counted as homeless more than doubled, to 2,590 in 2021 from 1,110 in 2020. In the most recent tally, completed in January, the total jumped again, to 3,295, in part because the hotel program made people easier to count but also because of the continuing housing crisis, with higher rents and fewer vacant apartments.

The rural state, with a population smaller than any but Wyoming, had risen to the top of two national rankings by last year: It had the second highest rate of homelessness per capita in the nation, after California — but also the lowest rate of homeless people living outdoors.

To some, it felt like a launching point. “With our smaller population, our culture and our passion, I think we felt a lot of hope that we could make real progress toward ending homelessness,” said Jess Graff, director of Franklin Grand Isle Community Action, a nonprofit agency in St. Albans, near the Canadian border.

But planning for long-term solutions faltered, hindered by a lack of housing stock, labor shortages and glacial timelines for construction. As it became clear that most hotel residents would return to homelessness, tensions rose between Gov. Phil Scott, a Republican, the Democrat-dominated legislature and advocates who were calling on the state to keep people in hotels.

The end date was postponed in March, at a cost to the state of $7 million to $10 million per month. On June 1, the expulsions began. An estimated 800 people statewide were turned out of hotel rooms that day as the Scott administration stressed the need to invest in long-term housing solutions instead.

“We will make every effort to ensure vulnerable Vermonters are sheltered,” Miranda Gray, a deputy commissioner of the state’s Department for Children and Families, said in a statement.

With waiting lists for shelter beds and transitional housing, the only option available to most of those forced from hotels this month was a free tent. Across the state, social service workers handed out camping equipment, a gesture that pained providers like Ms. Graff, who saw 28 households displaced from hotels in her area of northern Vermont on June 1.

“Even purchasing the tents is awful, because you’re in the store with a cart full of camping equipment, and people are saying, ‘Looks like a fun weekend!’” she said.

A few hotels, including the Quality Inn in Brattleboro where Mr. Alexander and his wife had lived for about a year, granted homeless guests a two-week extension, until June 16. As that deadline approached last week, residents expressed frustration and fear.

Kathleen McHenry, 55, had begun packing some belongings in her car and throwing others away. She said she was weary of the assumptions people made about her — and terrified she would be raped while sleeping outdoors.

“I’m not here because of drugs,” she said. “I’m here because I could not find a place to live.”

As a steady rain fell that night, Ms. McHenry kept dry under the hotel’s beige stucco portico, fussing over another resident’s baby before heading back inside to her two cats and her chunky Lab mix, Kirby. She said the bonds among residents, “almost like siblings,” had made the hotel feel more like a home.

Outcry over the expulsions has increased since June 1, ratcheting up pressure on legislators to act this week, the last days of their session. The remaining 2,000 hotel residents, whose stays under the pandemic aid program are scheduled to end July 1, include hundreds of children, and some adults who are bedridden, are dependent on oxygen, or take medications that require refrigeration, according to advocates. (Some are eligible to stay another month under the preexisting program that restarts next month.)

Facing a possible mutiny by a group of progressive lawmakers who opposed the motel expulsions — and whose votes are needed to override the governor’s veto of the budget passed by the legislature — legislators are expected to introduce a bill today that would allow the most vulnerable group to stay in motels until April, or until they find housing, as long as they help pay for their stays.

Brattleboro, a riverfront town tucked into the state’s southeastern corner, has deeply liberal and empathetic instincts. But it is also wrestling with rising crime downtown, and concern that it will hurt businesses and tourism. Days after the first wave of hotel checkouts, the town’s selectmen voted to hire a private security firm to patrol some areas where drug use had increased.

The town was badly shaken by the murder in April of Leah Rosin-Pritchard, 36, at the Morningside House shelter, where she was the coordinator. A resident of the shelter was arrested and found mentally unfit to stand trial. The 30-bed shelter has remained closed since.

The town, like many in Vermont, does not allow camping on public land and has made no exceptions for the people leaving hotels.

John Potter, the town manager, said the impact of the hotel program on Brattleboro, where people had come from around the state to stay in seven hotels, could be long lasting.

“We hope it helped them,” he said, “but what it leaves us with now is potentially more people looking for a roof over their heads than we had before.” The town has asked the state for help setting up a temporary 100-bed shelter in a vacant office complex.

Other states have avoided large-scale expulsions of homeless residents from hotels. In Oregon, state leaders decided early in the pandemic to buy hotels rather than rent rooms in them for months or years. The state spent $65 million in 2020 to acquire 19 properties and convert them to permanent shelters.

A few such purchases have taken place in Vermont, but by individual nonprofit groups. In Brattleboro, Groundworks Collaborative, a nonprofit agency, worked with a local land trust to buy an old chalet-style hotel in 2020, tapping federal relief funds to convert it to 35 units of supportive housing for people leaving the motels. A similar project in northern Vermont turned a former nursing home into 23 affordable apartments, Ms. Graff said.

The state made investments too, offering incentives to developers to build affordable housing and grants for renovations of abandoned properties. But as the need kept surging, the supply was nowhere near enough.

At the Quality Inn in Brattleboro, a woman who said she had lost her housing after divorcing her abusive husband worried about keeping her full-time supermarket job while living in a tent in a state park.

She said she copes with homelessness by finding “tiny escapes” — a waterfront picnic or a trip to a Chinese restaurant buffet — “to pretend, for an hour, that this is not our life.”