When Josia’s husband began beating her, the U.S. government stood ready to help, even though she was in the country illegally.

If she would assist the police investigation, she could get what’s called a U visa, which provides undocumented victims of serious crimes with work authorization, protection from deportation, and a path to citizenship. Congress’ idea in establishing the program in 2000 was to get criminals off the streets, that having a safer society outweighs the enforcement of certain immigration violations.

Josia was granted a visa after about eight months.

That was in 2011. But if it happened today, she would be in for a long and risky wait.

The visa program has been crushed under a backlog that’s grown to more than 160,000 cases, the wait time increasing to nearly five years as the federal government fails to keep up, putting thousands of immigrants who stepped forward to help in danger of being deported.

“One year was hard,” said Josia, 39, who came to Hanover, York County, from Angola and spoke on the condition her surname be withheld. “I can’t imagine five years.”

Now a Pennsylvania attorney has gathered more than a dozen colleagues and begun to sue — case by case, person by person — to force the government to do its job and rule on pending visa applications.

“This has been getting worse and worse and worse,” said David Freedman, an attorney at Barley Snyder, which has offices around Pennsylvania. “They should get what the government said they were going to get.”

A U.S. Citizenship and Immigration Services spokesperson said the agency does not comment on pending litigation. Options for cutting the backlog are limited — lagging resources have been previously cited as an explanation for delays — but the agency is always aiming to reduce the wait time, the spokesperson said.

It’s estimated that at least 1,000 U-visa cases are pending from Pennsylvania, with potentially hundreds in Philadelphia. None of those migrants can legally work, and all are vulnerable to removal.

So far 17 attorneys — six from Barley Snyder — are filing for immigrants whose petitions have languished for at least three years. The lawsuits say the government violated the Administrative Procedure Act, a law that allows federal courts to fix a federal government agency’s “failure to act.”

The action comes at a moment when the new Biden administration is pushing to reverse harsh Trump-era restrictions and create a more welcoming America. Advocates say that even when not directly imposing tough immigration rules or limits, the Trump administration used neglect and indifference to clog the system and put people at risk. President Joe Biden has pledged to cut processing delays and, in this case, triple the current annual cap on U visas to 30,000 from the 10,000 originally set by Congress.

The award – or non-award – of U visas has been the crux of some of Philadelphia’s biggest immigration cases.

In 2017, undocumented Mexican immigrant Javier Flores Garcia, who was stabbed in a 2004 assault, ended nearly a year in sanctuary inside a Center City church when his visa petition won preliminary approval.

In December, Carmela Apolonio Hernández and her four children began their fourth year in sanctuary, currently inside the Germantown Mennonite Church, after her application was denied. She filed as a victim of a 2017 attempted extortion in New Jersey, and an appeal is pending, according to Philadelphia immigration lawyer David Bennion.

Congress created the U-visa program to strengthen the ability of police agencies to investigate and prosecute violent crimes like domestic abuse, sexual assault, and trafficking, while protecting victims who suffered serious mental or physical abuse.

The law offset migrants’ fear of coming forward with a big incentive: Once placed on an official waiting list, they got protection from deportation and permission to legally work in the United States. The visa included a path to lawful permanent residence, also known as a green card, and then to full citizenship.

Now delays are so onerous that attorneys at the York-based Pennsylvania Immigration Resource Center are asking clients if they might have a different route toward legal status.

“It’s taking years to get on the wait list,” said Whitney Phelps, managing attorney for community programs.

PIRC has filed lawsuits for at least 20 people who applied more than three years ago but still haven’t received a response.

Even applying for a U visa has become chancy, Phelps said. In the past, U.S. Citizenship and Immigration Services simply approved or rejected an application. Now, when it denies, it also may issue a notice to appear in court, the first step in deportation proceedings.

The wait leaves people vulnerable and “living in fear,” said PIRC attorney Rosa Perez-Lupian. “First they escape this abusive relationship, then their fear is ICE, this other powerful thing that’s controlling their lives.”

Congress recognized that undocumented immigrants are uniquely vulnerable, that even after being assaulted they may hesitate to dial 911 or go to a hospital emergency room for fear of being reported and deported.

Biden’s plan to raise the cap to 30,000 is a promising start, said Amy Cheung, senior legal counsel at Connecticut-based ASISTA, which trains lawyers to help migrants who have been victims of violence, “but given the immense backlog, there is still more work to be done.”

The U-visa process isn’t easy. Migrants, no matter how physically or mentally traumatized, must help police at every step. The applications require that the police or prosecutor sign an accompanying certification, called a Supplement B. No U visa will be granted without it.

Most people get approved for the visa, about 84% in 2014, the last year for which complete data are available, according to a 2020 USCIS report. And the program has worked as intended. An Arts and Social Sciences Journal study found that issuing U visas enhanced the justice system’s ability to detect and prosecute crimes, and made communities safer.

But cases piled up as the number of applications far exceeded the annual 10,000-visa cap. In 2013 USCIS instituted a regulatory waiting list for those it determined were eligible. While on the wait list, families would be granted deferred action and work authorization.

But fewer and fewer were being added.

In 2018, as the backlog surged toward 152,000, USCIS placed only 7,421 people on the waiting list. That was two-thirds fewer than in 2014. Applicants now are waiting 58 months — nearly five years — to be put on the list, according to USCIS statistics.

“We’re saying put them on the waiting list or decide their cases,” Freedman said, adding that immigrants “have put their lives on the line in order to help law enforcement and prosecutors put dangerous criminals in prison. We’re not trying to exploit any loophole. We’re just asking the government to apply the regulation it wrote for itself.”

Josia, her husband, and their three children came legally to the United States in 2008 to spend time with close friends, American missionaries they came to know in Africa.

Josia discovered she was pregnant. Her husband, she said, decided they were staying in the country after their travel visa expired. He controlled their passports.

When her husband began hitting her, Josia said, she saw no escape in a land where she didn’t even speak the language.

“I was insulated, I was abused, physically, mentally, sexually,” she said. “It was very dark. … You don’t know there’s a way out.”

She found the courage to leave her husband and go to Safe Home, which assists domestic-violence victims in Hanover. Safe Home connected her to PIRC, which worked on her U visa.

A nurse in her native Angola, she’s now working as a certified nursing assistant and lab technician, and intending to become a registered nurse.

Next year she’ll formally seek U.S. citizenship.