ALBANY, N.Y. (CBSNewYork) – Gov. Andrew Cuomo signed the so-called “Green Light Bill” into law overnight, giving undocumented immigrants the right to a New York driver’s license.

New York is now the 13th state to authorize drivers’ licenses for immigrants who entered the United States illegally.

READ MORE: Westchester DA: Police Could Have Done More Early On To Link Robert Durst To Wife Kathleen's Disappearance

Cheers filled the New York State Senate chambers as the Driver’s License Access and Privacy Act, also known as the “Green Light Bill,” got the green light.

“Today’s vote helps support the promise of the American Dream,” said State Sen. Luis Sepulveda.

Web Extra: Read The Driver’s License Access and Privacy Act

The vote on the controversial bill followed hours of debate.

“How would a county clerk know if a foreign document is real?” asked State Sen. Daphne Jordan.

READ MORE: Nassau County Executive Bruce Blakeman Says Bail Reform Is Leading To Uptick In Violent Crime

“They’re already being trained, already receiving funding,” Sepulveda rebutted. “So this is nothing new to the DMV or county clerks.”

Supporters say the bill would lower the number of uninsured people and improve safety on the roads while boosting the economy. Critics, however, say it would circumvent federal law and encourage illegal immigration.

MORE: Bill Giving Undocumented Immigrants The Right To A Driver’s License Passes In NY Senate

A recent poll released by Siena College showed more than 50 percent of New Yorkers surveyed were against allowing undocumented immigrants to get drivers’ licenses.

“If we pass a bill that winds up targeted the undocumented, then shame on all of us,” Cuomo said.

The governor said he would only sign the bill into law if the state solicitor general found there were sufficient safeguards to prevent federal authorities from accessing the DMV database.

MORE NEWS: Fire Shuts Down Garden State Parkway In Brick Township

The law would go into effect in 180 days, meaning undocumented immigrants could get licenses beginning in December. Legislators say they will have to follow the same requirements as other licensed drivers in New York, which includes having auto insurance.