A federal judge has dismissed a legal challenge by the U.S. Department of Justice to New York’s 2019 state law allowing immigrants to obtain state-issued driver’s licenses regardless of legal status.

Known as the Green Light Law, the law has been criticized by the Trump administration since Donald Trump returned to the White House earlier this year, challenging it and similar laws in other states over provisions that prevent federal immigration enforcement from being able to access information the state Department of Motor Vehicles has on immigrants without legal status. The law allows the DMV to issue standard driver’s licenses to individuals without Social Security numbers and “regardless of their citizenship or lawful status in the United States.”

Attorney General Pam Bondi said when filing the lawsuit in February that provision is “tipping off an illegal alien and it’s unconstitutional.”

The law was passed by the Legislature and signed into law by then-Gov. Andrew Cuomo in 2019 in part to help improve public safety on the roads and make it easier for immigrant drivers to get insurance.

“Plaintiff has failed to plausibly allege that any challenged provision of the Green Light Law unlawfully discriminates against the federal government,” Anne M. Nardacci, the U.S. district judge for the Northern District of New York, wrote in a ruling Tuesday.

The Associated Press contributed to this report.