ALBANY — The state Senate’s top Republican has introduced a bill that would protect Department of Motor Vehicles employees from legal retribution, should they refuse licenses to undocumented immigrants.

The controversial “Green Light Law,” passed by the state Legislature and signed into law by Gov. Andrew Cuomo on June 17, has sparked outrage from county clerks across the state — some of whom have filed legal challenges in federal court arguing that the law conflicts with federal policy.

The bill from Senate Minority Leader John Flanagan (R-Suffolk) would permit a DMV employee to hire an attorney to defend himself should the state take civil action against them for refusing to administer the licenses.

It would also safeguard the employee from being fired if they acted in good faith complying with federal law.

“Senator Sepulveda, Assemblyman Crespo advanced legislation that is really benevolent and really helpful to illegal immigrants; doesn’t help the taxpayers, doesn’t help law-abiding citizens,” Flanagan said, calling out the bill sponsors Tuesday at a press conference on Long Island.

“It flouts federal law, it ignores federal law, it violates federal law, and yet state employees … are being forced to be put in a position where if they do the right thing and enforces federal immigration law, they face the chance of losing their jobs.”

“The governor has openly said he would remove county clerks that do not adhere to the principle of the law and the law. The logical extension of that is any state employee who now presently does not have the protection could end up losing their job. Why?”

The governor already has the power to remove certain elected officials, including county clerks.

Another bill specifically authorizes the governor to remove a county clerk from office should they refuse to recognize driver’s licenses held by undocumented immigrants.

Supporters argue the law would improve road safety and provide a boon to the state economy.

The Green Light Law takes effect in December.