By dawn Thursday, 500 people had lined up on the sidewalk outside the Project HOME apartments on Fairmount Avenue.

They had raced from work shifts and forgone sleep in a shelter bed or on a friend's couch to wait through the night for the thing they needed most: a home. Word had spread through social workers and shelter staffers and friends of friends: on Thursday morning at 8, Project HOME would start accepting qualified applicants for its newest affordable-housing units on North Broad Street — on a first-come, first-served basis.

There were 88 apartments available.

The line started forming Wednesday morning. The sun rose the next day on hundreds who had spent the night on the street for a chance at a single-occupancy apartment. Few on Fairmount could afford to be last in line.

Kameshia Graham had arrived at 10 a.m. Wednesday and was first in line. A former dental assistant, she said she became homeless two years ago in the throes of a mental-health crisis, and moved from the South Bronx to Newark to the Center for Hope, a shelter across the street at Broad and Fairmount.

"I'm getting the help I need here," she said. Her next step is living independently again, she said.

Down the block, Michael Bowser, 62, a retired chef, said he'd been sleeping at friends' houses for two years after an addiction to drugs and alcohol and a series of illnesses had rendered him homeless.

"It's just frustrating," he said. "Nothing's stable." His girlfriend Kim Jackson, who lives at the Francis House of Peace, another Project HOME building, had spent the night with him in line. She remembered waiting in a similar line two years ago. So did Wesley Mitchell, 54, another Francis House resident. On Thursday, he donned a bright orange "volunteer" T-shirt and walked up and down the sidewalk, answering questions, soothing the anxious, quelling arguments, and shaking hands with old friends.

"I got here at 4 a.m." on the morning applications were due, Mitchell recalled of his time on the line in 2015. "And I was, like, 30-something in line."

This time, the 30th person in line had showed up at 4 p.m. the day before.

"We got on the bus together and all came down like we were going on vacation," said Bonita Leonard, laughing with a group of women who had come from the same shelter. She had lived on the street for 35 years, she said, and inside for five months. Now she has a job at a Forman Mills store in West Philadelphia, and is looking to move from the shelter. "I'm just praying it works out," Leonard said. She and her friends, watching the growing crowds, were worried they had wasted their time.

Project HOME staff carried clipboards down the line, asking those waiting if they were registered to vote, or if they wanted to send a letter to their representative in Congress about the need for affordable housing. Funding for the newest apartments at 2415 N. Broad St., a mix of public and private money, is secure. But President Trump's proposed $6 billion in cuts to the Department of Housing and Urban Development has Project HOME concerned about funding for future projects. And the Philadelphia Housing Authority, which gets about 94 percent of its funding from HUD, is subsidizing rent at the new building.

Cuts to HUD are "exactly the opposite of what is needed" amid a national homelessness crisis, said Liz Hersch, the director of the city's Office of Homeless Services. "On any given day, we have almost 6,200 people who are in temporary housing — in emergency shelters, or transitional housing, or who are doubled up, or couch surfing. Those you see on the street are probably 10 percent" of the city's homeless population. "The tip of the iceberg."

Advocates rankled, too, at HUD Secretary Ben Carson, who grew up impoverished, and who last week characterized poverty as "a state of mind."

"Before, politicians would say, 'We understand there's a crisis but we're doing the best we can,'" said Sister Mary Scullion, Project HOME's founder. "The whole tone is changing. It's just frightening."

By 8 a.m. on Fairmount, organizers had to split the line into two large segments to avoid blocking streets and a nearby day-care center. Staffers set up at folding tables in the lobby as Graham, who had been waiting for 22 hours, walked through the doors. Someone snapped a picture of her, smiling with her application in hand. Another staffer consoled a crying woman who had made a mistake on her application. "They can help you out over there," she said, pointing to another set of folding tables.

A round of interviews, to be conducted throughout the summer, awaits the applicants. They'll find out in September if they've been approved for a spot, Scullion said.

"We'll easily have a thousand applications in by the end of Thursday," she said, "and thousands more after it.'