SAN FRANCISCO — The police chief in Oakland, California, on Thursday encouraged immigrants who were victims of a crime to reapply for a temporary visa certification, saying city officials may have wrongly denied as many as 25 of the applications after misinterpreting a state law.

The Alameda County Public Defender’s Office first raised the issue last week regarding two cases involving such visas, Chief Anne Kirkpatrick said.

A so-called U-Visa allows immigrants who are victims or witnesses of crimes such as murder, domestic violence, torture, kidnapping and armed robbery to stay in the country to help with the investigation or prosecution of the case.

Applicants must be certified by a law enforcement agency before the federal government gives final approval.

“We want our undocumented immigrants who have been the victim of crime to get these U-Visas,” Kirkpatrick said.

Oakland denied the certifications because officials believed applicants could be disqualified if they had criminal convictions or were suspects in a crime, Deputy Police Chief Oliver Cunningham said.

However, the department recently got clarification on a 2016 state law allowing immigrants convicted of a crime to be eligible for a U-Visa if they otherwise qualify.

The department said an internal audit found at least 25 of the 144 rejected applications for U-Visas in 2017 may have been improperly denied.

Cunningham said the two applications pointed out by the public defender’s office have since been approved.

“We recognize the error and we don’t want to hide behind it,” Cunningham said. “We want them to feel comfortable coming to us.”

He said the department will also review all the rejections it made in 2016.