The president of the Sergeants Benevolent Association—a longtime foe of Mayor Bill de Blasio—penned a letter in support of two Republican legislators’ lawsuit aimed at stopping the liberal administration from going through with plans to expunge the files of the city’s municipal identification program, believed to contain the personal information of thousands of undocumented immigrants residing in the five boroughs.

Edward Mullins addressed his missive to Staten Island Supreme Court Justice Philip Minardo, who will begin hearing arguments tomorrow from both attorneys representing the city and those representing Assemblywoman Nicole Malliotakis and Assemblyman Ronald Castorina. The two GOP Staten Island lawmakers have sued to prevent de Blasio from making use of a clause in the legislation that created the IDNYC program—designed to provide an I.D. to people lacking other forms of government paperwork—allowing the city to wipe its records after the end of last year.

Like the two GOP Staten Island lawmakers, Mullins warned in his message that dumping the identifying documents applicants submitted to obtain their IDNYC card could interfere with future criminal investigations.

“I write to inform the court of the law enforcement community’s strong belief that the city’s implementation of its purge is a grievous and misguided policy error that should not be allowed to occur,” wrote Mullins, a registered Republican and Long Island resident. “The mayor’s plan to destroy a database of government-held information, which could assist law enforcement in potentially solving crimes or, more urgently, preventing attacks on the city, is dangerous and foolish.”

Castorina and Malliotakis have warned that a criminal might use an IDNYC to establish a banking account for underwriting illicit activities. Mullins, however, seemed most concerned with the threat of terrorism—a threat he did not precisely link to the municipal identification program.

“We live in an age of extraordinary peril: we have witnessed countless acts of planned mass murder upon unsuspecting citizens in cities across the world too numerous to count,” his letter reads. “This unprecedented step to deny law enforcement access to the government’s own records—the very same government that law enforcement is sworn to protect—is yet another unnecessary obstacle that frontline responders will be forced to endure. The information that may be destroyed, could hold the key to solving, or preventing, a serioius crime.”

The union boss acknowledged the city’s argument that the program eases interaction between non-citizen crime victims and police. But he asserted that such victims are best served if law enforcement has access to all pertinent information when looking to solve a crime.

City Council members created the “memory hole” clause in the program to prevent federal immigration officials from requisitioning the records should a deportation-happy presidential candidate win the White House. Malliotakis and Castorina were able to stop the city from going ahead with the data dump by filing a Freedom of Information Law request for all IDNYC files in December.

It is illegal for a government to destroy documentation requested through FOIL.

The administration reacted to the Republicans’ success in gaining an injunction by announcing it would no longer retain any information about IDNYC applicants in its files. The city had previously stored images of I.D.-seekers’ paperwork on computer hard drives.

De Blasio and Mullins have clashed ever since the mayor entered office, over both police reform initiatives and contracts for the police department’s sergeants. The labor leader even sought to undermine de Blasio’s effort to attract the Democratic National Convention to Brooklyn, warning party leaders that the city had become too unsafe.

Today, the administration continued to insist that NYPD and Law Department experts agreed that the program’s application and records system is secure and appropriate.

“The city’s top priority is safety, and safety comes when vulnerable New Yorkers are more confident in interacting with the police,” a City Hall spokesman said. “IDNYC has proven to do just that, and has been a helpful tool to both communities and law enforcement.”

Updated to include comment from the mayor’s office.