The York County Prison will no longer hold immigrants who are being detained to face federal immigration proceedings, a move long sought by advocates who say people can safely, reliably await their hearings while free.

That comes four months after the immigrant detention center in Berks County emptied of the families it had confined. And it leaves the Pike County facility as the last to hold large numbers of immigrants, most of whom are pursuing legal efforts to stay in the country or who have been ordered deported.

“We’re very cautious about calling it a victory — it is a meaningful step,” said Erika Guadalupe Núñez, executive director of Juntos, the South Philadelphia-based Latino-rights group, which asserts that detainees at York have been held in inhumane conditions. “ICE continues its refusal to end detention, by transferring folks and disappearing folks from facilities that are being closed to other detention centers.”

Núñez said Juntos’ goal is to make sure the immigrants now held at York are released, not transferred.

U.S. Immigration and Customs Enforcement officials said negotiations with the county for a new contract, which would have run through 2026, have proved unsuccessful.

“ICE has been informed that York County Prison officials do not wish to proceed with additional contract negotiations,” the agency said in a statement Thursday. “The health, welfare and safety of non-citizens in ICE custody will continue to be one of the agency’s highest priorities.”

The news was first reported by the York Daily Record, which said the confinement of detainees will end Aug. 12. Warden Adam Ogle wrote in a memo to the staff that ICE will “truly be missed.”

The county determined that new federal standards would have required expensive upgrades at the facility, and noted that the detainee population — in the 700s last year and now 317 — has been dropping amid the pandemic and the change in presidential administrations, the newspaper reported.

“Every legal practitioner and advocate in Pennsylvania will celebrate the end of immigrant detention in York,” said attorney Bridget Cambria, executive director of ALDEA — The People’s Justice Center in Reading.

Cambria was at York on Wednesday, she said, sitting with an asylum-seeker as he wept from fear of being deported and separated from his family, and from the despair of past persecution in his homeland that left him blind.

“His detention serves no legitimate purpose,” she said. “He’s surrounded by hundreds of others just like him.”

Asylum is a legal means of staying in the country, which can be granted to people who could be harmed or killed in their homelands.

Desi Burnette, state coordinator of the Movement of Immigrant Leaders in Pennsylvania, said county, state, and federal officials must ensure that families stay together, not split and sent to other countries or detention centers.

“All parties involved in creating these contracts must work to release people to their families as this contract ends,” Burnette said.

Four months ago in March, the Berks County detention center, long the target of activists who condemned it as barbaric, emptied of its immigrant families. Advocates had long maintained that those held at Berks could be instantly released to family members, allowed to continue fighting their asylum claims from outside of confinement.

The future use of that 96-bed lockup, operated by the county through a contract with ICE, is unclear.

The centers’ reason for existence is to confine immigrants awaiting court hearings, which former President Donald Trump said was the only way to make sure they would show up. He said as little as 2% of those released to friends, family, or sponsors returned for court.

In fact, studies showed upwards of 80% appeared as directed between 2008 and 2018. And among those represented by a lawyer, 96% attended all of their hearings

“From sea to sea,” Nancy Nguyen, executive director of VietLead in Philadelphia, said on Thursday, “we are seeing local communities say, ‘Enough.’”