More than 800 immigrants who had been ordered deported were mistakenly granted U.S. citizenship because of gaps in fingerprint recordkeeping, the Department of Homeland Security Office of Inspector General reports.

The immigrants were from “special interest” countries and had previously been ordered deported or removed from the U.S., the report said. But the immigrants beat the system by simply using another name or birth date to apply for citizenship.

The issue: Neither Homeland Security nor the FBI keeps all old fingerprint records of individuals previously deported.

Homeland Security investigations resulted in two immigrants being stripped of citizenship, but “very few” of the 858 cases of citizenship have been investigated to determine if the citizen should be denaturalized or criminally prosecuted, the report added.

Immigration and Customs Enforcement officials told the IG’s office that the cases were not pursued because federal prosecutors “generally did not accept immigration benefit fraud cases for criminal prosecution,” the report said.

The inspector general’s office found that prints are missing from Homeland Security digital records because paper-based fingerprint cards used prior to 2008 were not consistently uploaded into the digital system. The FBI is also missing records because, in the past, fingerprints collected during immigration enforcement encounters were not always forwarded to the FBI, the report said.

Currently, about 148,000 fingerprint records of foreign nationals from special interest countries — countries that present national security concerns or have a high rate of immigration fraud — who had final deportation orders or who are criminals or fugitives have yet to be digitized, the report said.

At least three people who became naturalized citizens after having been deported under a different identity had obtained credentials to conduct security-sensitive work at commercial airports or maritime facilities, the report says. Since being identified, all have had their credentials revoked.

“This situation created opportunities for individuals to gain the rights and privileges of U.S. citizenship through fraud,” Inspector General John Roth said in a statement.

Roth said Immigration and Customs Enforcement now has plans to upload all available fingerprint records, and Homeland Security will review every questionable case to determine if citizenships should be revoked or criminal charges filed.