Plans to clear out two Philadelphia encampments where dozens of homeless people have lived in tents for months have been postponed until at least Thursday, after residents of the encampments filed a lawsuit seeking to block the city from closing the sites.

City workers on Monday posted a formal notice that the protest camps — one on a ball field along the Benjamin Franklin Parkway and a smaller one on Ridge Avenue outside the headquarters of the Philadelphia Housing Authority — had to disperse by 9 a.m. Tuesday or face eviction. Dozens of activists arrived on the scene as early as 7 a.m. to defend the Parkway site and its residents from an expected police presence, but 9 a.m. came and went with little activity.

A hearing on the lawsuit, filed in federal court on behalf of residents of both encampments, is scheduled for 1 p.m. Thursday. A city spokesperson said that until the hearing, the Kenney administration’s efforts “to offer wide-ranging services to those in the encampments will continue,” though “no other action to resolve the encampments [is] currently planned.”

Even after the suit was filed, city officials and encampment organizers were still negotiating, alongside Councilmembers Kendra Brooks and Jamie Gauthier, who pushed the administration to return to bargaining with the protesters. Gauthier said she respects their demand for “real, safe, permanent housing solutions.”

The sticking point between the administration and the encampment organizers has largely been the word permanent. City officials say they have offered “pathways to permanent housing,” putting up residents of the encampments in shelters or quarantine space set aside amid the pandemic. Protesters say the city should provide the residents housing in city-owned properties, but the Housing Authority and city officials have dismissed the idea.

During a Tuesday afternoon news conference, Mayor Jim Kenney said that his administration can’t accede to that demand without state or federal cooperation and that the vacant units aren’t equipped with plumbing or electricity. He said that without an amicable resolution or blocking from a federal judge, a sweep of the encampments is “imminent.”

“At some point in time, this has to end,” Kenney said, “because it’s not tenable, and it’s not sustainable.”

City officials have been clear in their intention to end the encampments. In mid-July, officials postponed a scheduled dispersal of the sites — the Parkway encampment was about five weeks old, with 100 to 150 people sleeping there at the time — because talks, they said, had broken down. Kenney then personally intervened and negotiated with organizers.

On Monday, the mayor said that after weeks of face-to-face discussions, he concluded “further negotiations would be fruitless,” and city officials posted the notices to clear out by Tuesday morning. The 24-hour warning differed from the way the city handled encampments of people experiencing homelessness in 2018 and 2019 in Kensington, when those living in the camps were given 30 days’ notice prior to eviction and everyone was guaranteed a spot in a shelter or treatment facility.

The difference is that these encampments’ organizers are activists who have tied housing justice to the Black Lives Matter movement, and those who call the encampments home said they had no intention of leaving. Indigo, a 20-year-old former Temple University student who did not give a last name, has lived in the encampment on Ridge Avenue since June. He said he had no place else to go.

“This is our home,” he said. “We will stand here and defend it with our bodies.”

The status of the encampments as a protest was part of the argument lawyers representing the residents made on constitutional grounds. They say the city is attempting to violate the residents’ right to protest, as well as their right to keep property, referencing personal belongings they assume would be destroyed in a sweep. (The city said it would keep residents’ belongings in a warehouse for up to 30 days.)

Stephanie Sena, a professor of poverty and policy at Villanova University’s Widger School of Law, organized the lawsuit along with a student. She said while the encampment “is not ideal,” sweeping the area isn’t the answer.

“We believe a sweep is deadly,” she said, “because the reason people put themselves up at encampments is because they can access services better, including a medic, food donation, and running water.”

Dozens of activists surrounded the encampments Tuesday morning, many responding to social media posts summoning supporters for “urgent eviction defense.”

“We’re here to stand strong, that’s what the residents want to do,” said Jennifer Bennetch, 35, a housing justice advocate and an organizer of the Ridge Avenue encampment known as “Camp Teddy.”

On the Parkway at 22nd Street, about 75 people arrived Tuesday morning, chanting, “Give us housing, where do we go?” They represented organizations including the Workers Revolutionary Collective, ACT UP Philadelphia, and I Will Breathe. They prepared to defend the camps by blocking entrances with wooden pallets, metal barricades, and traffic cones, and practiced with each other, testing how the materials held up when aggressively pushed.

Sterling Johnson, an advocate working with camp residents, said they were impressed by how many people showed up at the Parkway, where the camp is known as “Camp JTD” after James Talib-Dean, an organizer who recently died.

“People come out for eviction defense nowadays. It used to be 10 people, and now it’s like hundreds,” Johnson said. Alex Stewart, an organizer with the Workers Revolutionary Collective, said it was a “blessing” to defend the residents of the campsite, and said activists and residents remain vigilant as the court case plays out.

”No one’s getting tired,” said Janelle Johnson, who works in the camp as a nurse. She said the threat of eviction and the news that the camp would remain on the Parkway for at least a few more nights was “bittersweet.”

As she stood on the sidewalk, a man passed by and muttered something to her. “What did he say?” Stewart asked.

“He said, ‘You’re supposed to be gone,’” Johnson said.

She turned toward the man, walking away toward Center City, and called after him: “But we’re still here!”

Staff writers Vinny Vella, Sean Collins Walsh, and Samantha Melamed contributed to this article.