A federal judge on Friday denied a challenge to a law that will allow New York to give driver’s licenses to undocumented immigrants.

The law, which is set to go into effect next week, was facing its second challenge in court, the Rochester Democrat & Chronicle reports.

U.S. District Judge Gary Sharpe ruled against Rensselaer County Clerk Frank Merola, saying he lacked the legal capacity to bring the lawsuit against the state over the new law.

ADVERTISEMENT

The lawsuit, which was tossed out without the judge ruling on the merits of the law itself, was the last chance to block it before state Department of Motor Vehicles offices open on Monday, the news outlet noted.

At least three other lawsuits are challenging the measure and are either pending or on appeal, but the law will begin being implemented Monday morning.

The law allows immigrants to use foreign-issued documents to prove their identity and age, and would not require a valid Social Security number to obtain a driver’s license in the state.

New York Attorney General Letitia James hailed the judge’s decision, noting that it was the second time a judge has dismissed challenges.

“We expect all public officials to comply with the law, and, as the state’s attorney and chief law enforcement officer, I will continue to vigorously defend it,” James said in a prepared statement.