New York City’s municipal identification program had its day in court on Thursday as two Staten Island lawmakers argued New York should not destroy applicants’ records—to protect undocumented immigrants—because it is detrimental to national security and public safety.

The lawsuit challenging the IDNYC program was brought by state Assemblyman Ronald Castorina Jr. and Assemblywoman Nicole Malliotakis, both Republicans, in state Supreme Court on Staten Island. In early December, city officials said they would no longer retain documents of those who apply for the program, out of fear that President-elect Donald Trump could use them to deport undocumented immigrants. A state judge in December temporarily barred the city from destroying the records while the court considers the suit.

The program, which began in 2015, was aimed at increasing access to city services like schools and libraries, especially among the city’s estimated half a million undocumented immigrants. There are now nearly one million cardholders.

The two lawmakers argue that destroying the records violates the state’s Freedom of Information Act. City officials say that in destroying records like passports or birth certificates, they were following the city law that established the program. But most of Thursday’s hearing, during which several city officials testified, focused not on public record-keeping rules but on wide-ranging topics from terrorism to bank fraud.

“This is an issue that involves the blood of Americans,” Mr. Castorina testified. A terrorist could use the city ID to open a bank account, he added.

Lawyers representing the lawmakers said the law violated the U.S. Patriot Act. Attorney Ravi Batra wondered if the law took into account public safety and national security, “especially when we had 9/11 right here?”

Click here for more from the Wall Street Journal.