NEW YORK (CBSNewYork/AP) — Two state lawmakers from Staten Island sued on Monday to try to stop New York City from destroying personal records related to its immigrant-friendly municipal ID cards.

The city is considering the move to prevent the data from becoming a deportation tool for a new Republican federal administration.

READ MORE: Appointments No Longer Needed At NYC's COVID Vaccination Sites; Anyone 16+ May Walk In, Mayor De Blasio Announces

The lawsuit comes ahead of a Dec. 31 date for the city to decide whether to delete copies of the passports, birth certificates, educational records and other documents submitted by more than 900,000 IDNYC cardholders. The date was built into the program from its 2014 start, partly out of concern about the possible election of a Republican president such as President-elect Donald Trump, whose campaign promises included deporting millions of people in the U.S. illegally.

Republican State Assembly members Ron Castorina and Nicole Malliotakis, citing state public-records laws, said in their lawsuit that destroying government records “due to the results of a federal election is against the ideals of the United States and has no basis in law.”

The lawmakers argue that the information could help to trace cardholders if they commit crimes or obtain municipal IDs under fraudulent identities, perhaps for nefarious purposes.

“As elected officials, we have a duty to protect our constituents from unlawful government action that compromises their safety,” Malliotakis said in a statement.

Castorina said he was appalled that the program’s authors would “play politics” with the data.

Asked about the lawsuit on Monday, Democratic Mayor Bill de Blasio said city officials wouldn’t “allow ourselves to be in a situation where those records would be turned over to the federal government.”

“The reason people were willing to trust us is: We made very clear that there would never be a situation where it would lead to their deportation, and we’re going to keep that pledge,” he said.

Officials said no decision had been made on retaining the records, however.

Municipal ID programs began in 2007 in New Haven, Connecticut, and have expanded to about 10 cities, including Los Angeles and San Francisco. New York’s program is the most ambitious.

READ MORE: Ghislaine Maxwell Due In Manhattan Federal Court On New Sex Trafficking Charges Allegedly Involving 14-Year-Old

Officials encouraged all New Yorkers to sign up, but the program was aimed at those without other forms of ID, including homeless people and, especially, the estimated 500,000 immigrants living illegally in the city. The ID would help them do such everyday things as cash checks or attend parent-teacher conferences at public schools, supporters said.

But with civil liberties advocates worried about authorities requesting the data, city law provided for destroying applicants’ identity and residency information at the end of this year if administrators don’t move to keep it.

“Protecting it from a possible Republican president” was among reasons for the provision, according to City Councilman Carlos Menchaca (D-38th).

City officials said applicants’ documents are carefully verified to guard against ID fraud, and the city notes IDNYC cards can’t be used to get driver’s licenses, board planes or cross borders.

“Claims that IDNYC is being used by those intending serious harm is reckless fearmongering,” mayoral spokeswoman Rosemary Boeglin said.

“We made very clear that there would never be a situation where it would lead to their deportation,” Mayor Bill de Blasio said. “And we’re going to keep that pledge.”

Some immigrants have said they remain hopeful the city IDs won’t backfire.

Alberto Saldivia got his “IDNYC” card this year after spending 15 years in the country without legal authorization.

“It did cause me considerable concern, because they have my information, also the information of my son,” the 53-year-old Mexico native said through an interpreter earlier this month.

De Blasio vowed last month that the city will never turn over any IDNYC records to the federal government.

MORE NEWS: Long Island Boy Who Is Visually Impaired Receives Toddler Cane From Local Nonprofit

(TM and © Copyright 2016 CBS Radio Inc. and its relevant subsidiaries. CBS RADIO and EYE Logo TM and Copyright 2016 CBS Broadcasting Inc. Used under license. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. The Associated Press contributed to this report.)