The top counsel in Gov. Andrew Cuomo’s administration on Monday released a letter to Solicitor General Barbara Underwood seeking her legal opinion on whether the measure could expose undocumented immigrants to federal immigration enforcement if they apply for a driver’s license.

The letter was released just as the state Senate began debate on the legislation that would allow undocumented residents to apply for driver’s licenses in New York.

“Accordingly, we pose the following question to you – will the proposed law definitively prohibit the Federal Government, or any related or affiliated subdivision, from accessing – directly, indirectly or through judicial process – any database or other compilation of information or material in the possession, custody or control of the New York State Department of Motor Vehicles?” Cuomo Counsel Alphonso David wrote.

“Obviously in responding to this question, we ask that you assume a Federal legal challenge to such a New York law should it be enacted, and take into consideration similar laws or circumstances in other states, as well as our current data sharing process with the Federal Government.”

Cuomo has raised concerns with the bill in the last several days, and did not rule out a veto on Monday if the measure leads to the federal government accessing the records of undocumented immigrants in the state.

Advocates for the legislation have blasted Cuomo’s concern, calling it a last-minute red herring and reversal from his stated support for the bill.