NEW YORK - A judge on Friday ruled in favor of the city in its efforts to destroy records tied to its municipal ID program, stemming from a lawsuit filed by two state Assembly members from Staten Island.

The city's municipal ID program, IDNYC, now has more than one million cardholders, which means there are millions of documents containing those people's personal data. The city had planned to destroy those records by the end of last year, in part to prevent the federal government from accessing them for deportation purposes.

Two Staten Island Assembly members, Nicole Malliotakis and Ron Castorina, went to court to try to stop them.

"Our concern is what does this mean now for a government being able to destroy records. What does that mean for the future of judicial inquiries, law enforcement wanting to access information, Freedom of Information Law requests being satisfied," Malliotakis said.

On Friday, Justice Philip Minardo ruled in favor of the city, ruling the Assembly members had no legal standing to file suit.

But the city cannot begin destroying the records immediately. That will have to wait until a ruling by an appeals court. 

In a statement, Mayor Bill de Blasio said, "With this decision the State Supreme Court protected 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."