A bill introduced by the top Republican in the state Senate on Tuesday would provide safeguards to state Department of Motor Vehicle workers who do not comply with a new law that allows undocumented immigrants to apply for driver’s licenses in New York.

The proposal from Senate Minority Leader John Flanagan comes as the new law is set to take effect at the end of the year. Several county clerks who oversee and administer local motor vehicle offices have filed lawsuits in federal court to overturn the measure.

Flanagan’s proposal, introduced with Republicans in the state Assembly, would allow a DMV worker to hire an attorney to defend themselves if any civil action is taken against them by the state. And the proposal is designed to protect an employee if they take action in good faith in line with federal law.

“Democrats in Albany didn’t yield to the will of the people who overwhelmingly oppose this bad policy that puts our state Department of Motor Vehicles employees in the awful predicament of choosing between whether to abide by federal law or to issue a state license to an illegal immigrant,” Flanagan said in a statement.

“It should not be up to our DMV workers to ferret out potentially fraudulent foreign documents that can open up our voting system to abuse, and if they feel uncomfortable with doing so they should not fear being fired. This legislation would protect our employees who act in good faith to follow federal law instead of abetting illegal behavior.”