Legislation that would allow undocumented immigrants to obtain driver’s licenses in New York was said to be constitutional in a statement from the state Attorney General’s Office, which cleared its way to becoming law following final passage from state lawmakers on Monday.

After passing the state Senate Monday evening by a razor-thin margin, the bill was signed into law by Gov. Andrew Cuomo. It had already been approved in the State Assembly.