Mayor Bill de Blasio is endangering all New Yorkers by promising to delete data related to the city's program that offers identification cards to undocumented immigrants rather than give federal officials access to the information, a state legislator from Staten Island charged Monday.

Assembly member Nicole Malliotakis issued the warning during a news conference outside the Department of Finance Staten Island Business Center, which serves as an application office for the IDNYC cards.

De Blasio pledged to destroy IDNYC databases should the Donald Trump administration use it to hunt for undocumented immigrants to deport.

A provision of the IDNYC policy code allows for the erasure of that data on or before December 31, 2016 — designed in the event a political shift would make that information a target.

RELATED: Bill de Blasio promises to protect immigrants ID-card data

“The purging of data acquired through the IDNYC program would create a new risk to the safety of all New York City residents in that, should someone use the program to create a fake identity for malicious purposes, we would be left without the means to learn how he or she created it,” argued Malliotakis, a Republican.

“The records provided to the city in pursuit of the identification cards carry their own inherent value, and if our Mayor is serious about preserving public safety he’ll ensure that they aren’t destroyed,” she said.

Malliotakis stressed that the IDNYC program is an “unmitigated disaster” because obtaining the city ID is easier than obtaining a Costco membership.

“There is little to no integrity to the vetting process, and now the administration wants to destroy the sparsely collected data that was used to issue ID to thousands of people,” added Staten Island Assembly member Ron Castorina, also a Republican.

A City Hall spokesperson responded that the assertions of the two assemble members are unfounded.

"Claims that IDNYC is being used by those intending serious harm is reckless fear-mongering," the spokesperson told the Staten Island Advance, adding that the application process is similar to that used to obtain a driver's license in states nationwide.

The IDNY cannot be used to board a plane or obtain a New York State driver's license. More than 900,000 New Yorkers have obtained the cards, the spokesperson said.

In the meantime, immigrants on Staten Island are bracing for a siege on their rights, according to some activists.

“We need to hope for the best but prepare for the worst,” Cesar Vargas, a Mexican-born Staten Island lawyer and immigrant activist said at an emergency post-election meeting of Spanish-speaking residents in Port Richmond, a working-class neighborhood on Staten Island’s North Shore.

Vargas provided attendees an eight-page packet that outlined a plan in case someone in a household is detained by immigration officers. It includes contacts for lawyers, advice for connecting with relatives inside and out of the country, preparations for being separated from children and places to get official documents and records.

He told the crowd that this emergency guide ought to be hidden, The New York Times reported.

Gov. Andrew Cuomo articulated his commitment to protecting the diversity of New York in a Facebook post on Nov. 13: “If any immigrant feels that they are under attack, I want them to know that the state of New York — the state that has the Statue of Liberty in its harbor — is their refuge.”

"We won’t allow a federal government that attacks immigrants to do so in our state," he said.