The U visa program, created in 2000, offers immigrants who are in the country illegally temporary legal residency and a path to U.S. citizenship if they cooperate with law enforcement officials after being a victim of or a witness to violent crimes, among them domestic violence and sexual assaults.

But under the Trump administration, the federal program is facing the biggest backlog in its history, officials said, meaning that immigrants could be deported as they wait for their visas. Last year, fewer immigrants applied for the visas — the first annual decline since 2007 — in what law enforcement officials and lawyers called a sign that immigrants were growing wary of helping police and prosecutors.

In San Francisco, Sgt. Inspector Antonio Flores had welcomed the crackdown on crime that he thought would be a tenet of the Trump administration. Instead, he said, the growing delays in issuing the U visas have frightened victims who are in the country illegally from coming forward and, in turn, thwarted charges against suspects.

“It’s been very challenging for us,” said Flores, who heads the human trafficking unit at the San Francisco Police Department. “We believed things were going to be easier for law enforcement, and it didn’t quite work out that way.

“Let us do what we do,” Flores said. “If I get a good perpetrator, a suspect, give me the tools. Don’t take away my tool.”

In Tucson, Ariz., the police chief, Chris Magnus, said the visa protections have for years been essential to persuade immigrants who are in the country illegally to report crimes without fear of being deported. But in recent weeks, immigration lawyers have informed him that victims and witnesses are reluctant to cooperate with police.

And even if they do, the lawyers told him, the backlog leaves victims worried that they will be deported after they apply — and identify themselves as immigrants in the country illegally — but before they get their visas.

“If we want them to come forward and participate in the prosecution process, they need to have confidence that their family members or themselves are not going to be deported while participating,” Magnus said. “If the real goal is to get dangerous criminals off the street, it seems like this is a sort of contradiction in terms of priorities and focus.”

Congress approved the visa program in 2000 to encourage immigrants who are in the country illegally to work with law enforcement.

The first step for a U visa is local certification: Police, prosecutors or judges must certify the victim’s help in criminal cases before immigrants apply for the U visa. After being certified, the federal government scrutinizes applicants and places them on a waiting list that provides temporary residency for themselves and family members and the opportunity to apply for a work permit while they wait for their visas. It is the period to even appear on the waiting list that has ballooned.

Only 10,000 U visas are issued annually; it can take years for an immigrant to receive one, even after the criminal case they assisted has been closed. (Relatives of the immigrants are not subject to the cap.)

After this article was published, a spokeswoman for U.S. Citizenship and Immigration Services, Jessica Collins, said the agency has issued as many U visas as it can annually since 2010.

The average time just to be placed on a waitlist was 11 months in fiscal year 2015, according to data provided by U.S. Citizenship and Immigration Services. In 2017, more than 61,600 people applied for the visa, adding to a backlog of 190,000 pending applications.

By fiscal year 2018, the backlog had grown by more than 20%, to more than 229,000 pending applications, creating a wait of at least 3 1/2 years to get placed on the waiting list. Applications for the visa declined last year for the first time, falling by more than 3,000.

Now, applicants expect to wait at least four years before receiving any protections.

In April, Kevin McAleenan, the acting homeland security secretary, told Congress the visa program was a key part of local efforts to crack down on crime against immigrants. “The concern that the most vulnerable population in our communities are going to be victims and really, the U visa is an appropriate tool for that,” he said.

But Citizenship and Immigration Services officials said they are struggling to quickly assess and approve the visas, given the sheer volume of applications. Last year, the agency approved 17,710 U visas for applicants and their relatives — which included applications from past years — and denied 4,491.

Leslye E. Orloff, director of the national immigrant women’s advocacy project at American University, said she is called every month by lawyers representing immigrants who have been certified for a U visa but are still being threatened with deportation. The calls used to come only a few times a year.

“The most dangerous time is from filing to waitlist approved,” Orloff said of the period when a crime victim could be deported. Even their abusers could threaten to report them for deportation if they try to talk to police, she said.

Although the visa delays were a problem during the Obama administration, immigration lawyers and police officials said they have worsened under Trump.

Last year, the Trump administration also began allowing Citizenship and Immigration Services to order immigrants to appear in court when they are denied a visa, which immigration lawyers have said has given potential applicants pause. Previously, if an immigrant was denied a visa, they had time to apply again and pursue other options to stay in the United States.

Police officials have noticed Citizenship and Immigration Services officials are more closely scrutinizing crime victims’ visa applications, including questioning what evidence they provided in prosecutions. That has most likely slowed the visa approval process, given there are as few as 40 to 80 officials reviewing the applications.

In April, Flores was alarmed to receive letters asking about evidence in two domestic violence investigations from victims who were certified in fiscal year 2016 for the visa. The applications are still under review.

As they wait for their visas to come through, the crime victims, who have now revealed themselves to authorities and tried to put their perpetrators behind bars, are also vulnerable to new attacks or abuse.

In 2014, a Mexican immigrant in the U.S. illegally who asked to be identified by only her first name, Lucy, said she began to be verbally and physically abused by her domestic partner. Police eventually opened an investigation as a result of her claims and in 2016 certified her application for a U visa in exchange for her witness testimony. But Lucy still hasn’t been placed on the waiting list and, as a result, has no protections.

In an interview, Lucy said she has encouraged other immigrants in the country illegally to report crimes to the police. But she does not have a work permit or other protections that were promised to her as part of the visa application process and has at least once been stalked by her abuser, who has since been released from jail.

Without a legal job, she said, she was supported by another man who, over time, also began to abuse her. She no longer lives with that man.

“I’ve had to hide from danger all the time,” said Lucy, 47, who lives in Maryland. “It’s difficult to find work. To have to depend on someone to pay for rent and food. I have to figure out how to survive.

“With the U visa that would all be over,” she said. “I would have a better job and salary as a woman to be able to move on with my life.”

The heightened vetting by Citizenship and Immigration Services aims to “ensure that the integrity of the U visa program remains strong so that it continues to be a valuable tool for law enforcement and provides meaningful protection to victims,” said Daniel Hetlage, an agency spokesman.

But local police departments worry that the delays have effectively eliminated an incentive for potential witnesses to report crimes.

Aileen Robinson, coordinator of the Chicago Police Department’s anti-domestic violence unit, said immigrants in the country illegally were less likely to approach authorities without the assurances of legal protections.

“You did the first step and were certified by law enforcement; did the thing people told you not to, which is reach out to law enforcement,” Robinson said, relaying immigrants’ concerns. “And now you have to wait with no protection.”

In San Francisco, Flores called the U visa program a “win-win” — not just for immigrants who want legal residence in the United States, but also for entire communities.

“It’s hard for individuals sometimes in law enforcement or government to see that,” he said. But “if I get some bad guy or bad person off the street, and I’m holding that person accountable, I’m making my community safer.”

This article originally appeared in The New York Times.