(CNN) Undocumented immigrants in New York will be able to apply for driver's licenses this week after the state's so-called "Green Light Law" went into effect Monday.

The law, which was signed by Gov. Andrew Cuomo in June, expands the forms of identification that can be used by applicants to obtain a driver's license in the state, including foreign passports and a foreign driver's license.

Unless required for federal ID purposes, the law also stipulates that "the commissioner, and any agent or employee of the commissioner, shall not disclose or make accessible in any manner records of information that he or she maintains, to any agency that primarily enforces immigration law or to any employee or agent of such agency, unless the commissioner is presented with a lawful court order or judicial warrant."

At the time of its adoption, the law was heralded by supporters as a way to allow undocumented immigrants a way to live and work in the state without having to fear deportation.

Legal challenge

"As New Yorkers, we have an obligation to defend other New Yorkers," Gustavo Rivera, D-Bronx, said from the state Senate floor in June. "And every one of these individuals, whether they're documented or not, are New Yorkers."

The law comes into force after a last-minute legal challenge brought by the Rensselaer County Clerk was thrown out by a federal court judge Friday.

"The Green Light law is legal and enforceable, and two separate federal courts have now already dismissed the meritless claims of two county clerks," New York Attorney General Letitia James said in a statement Friday, referencing challenges to the law.

"Beginning Monday, the law will help make our roads safer, our economy stronger, and will allow immigrants to come out of the shadows to sign up as legal drivers in our state," she said.

"I am disappointed, and hopefully, this is only a setback," Rensselaer County Clerk Frank Merola said in a statement posted on the county's Facebook page Friday.

On Monday morning, Merola told CNN the county was referring undocumented applicants to the state Department of Motor Vehicles, citing a lack of training.

"We've never accepted foreign documents, and never had to," he said.

Merola said only three of the 17 Rensselear County DMV employees that needed to be trained in how to process such requests and documentation had been trained so far. He said they would be referring undocumented individuals to the state office, "until everybody is up to par."

He added that one person had arrived at the county DMV on Monday morning with foreign identification documents.

In a statement posted to Twitter on Monday, the spokesperson for the Department of Homeland Security said the law will "protect criminals at the expense of the safety and security of law-abiding New York residents."

New York has decided they aren't going to let Homeland Security Investigations access DMV data when we are investigating things like child pornography, terrorism and human trafficking. Terrible law that protects criminals. Statement👇 pic.twitter.com/FmCR4QqpAP — DHS Press Secretary (@SpoxDHS) December 16, 2019

"Besides giving drivers licenses to hundreds of thousands of people who broke our laws and have come to our country illegally, the New York law also blocks DHS law enforcement officers who investigate crimes like, child exploitation, human trafficking, terrorism, the targeting of gang members, sex offenders and drug smuggling, from accessing important public records," the tweet read. "Accessing this information is vital to building out these criminal cases, identifying criminal suspects, and enhancing officer safety."

The law applies to noncommercial driver's licenses and learner's permits.