Immigration advocates and city officials celebrated a legal victory Friday after a State Supreme Court judge on Staten Island ruled that the city could proceed with destroying the personal documents used by New Yorkers to sign up for the IDNYC program.

Judge Phillip G. Minardo ruled against a lawsuit brought forward by Ronald Castorina Jr. and Nicole Malliotakis—two Republican members of the state assembly from Staten Island who had sought to prevent the city from destroying copies of foreign passports and other documents used by cardholders who enrolled during the first two years of the program. Last December, the city announced it would no longer keep new applicants' documents and information on file, but Minardo ruled that same month that the city must wait to destroy the existing information. His ruling today, however, means that wait is over and the old data will be destroyed, easing the worries of many who feared that federal agencies like ICE, emboldened by president Trump's harsh immigration crackdowns, would use it to ensnare and deport undocumented immigrants.

In a statement Friday, Mayor de Blasio praised the State Supreme court for protecting the personal information of a million New Yorkers. "IDNYC was created to protect people and connect them to vital services and today's decision ensures it will continue to do just that. We applaud the ruling and will fight any attempt to appeal it," de Blasio said.

In his ruling Friday, Minardo reportedly disagreed with Castorina and Malliotakis's claims that purging the data would pose a threat to national security. NYPD deputy commissioner for counterterrorism John J. Miller had testified against the GOP lawmakers, stressing that the police had signed off on the data purge and that the program posed no credible terrorist threat.

"It's disappointing that we were ruled against based on a procedural issue of standing, as opposed to the merits of the case," Malliotakis told SI Live following the ruling. "We do disagree, and in the meantime, we have a serious concerns about what this means regarding government transparency. What does it mean if a government entity is allowed to destroy documents that are FOILable and subject to judicial inquiries, and should be accessible to law enforcement?"

The Legal Aid Society, which provides not-for-profit advocacy across the five boroughs, also praised the decision as a win for the city's immigrant population. "IDNYC is an incredibly important form of identification for our clients, who are often eligible for no other form of government-issued photo ID. In certain situations, lack of identification can set into motion a nightmarish sequence of events for immigrant communities sometimes leading to detention or deportation. IDNYC helps avoid those dire consequences.”