"This is life-changing, and we are proud to stand on the right side of history because every New Yorker should have the opportunity to contribute to their economies and communities without fearing that they will be separated from their family because of a routine traffic stop,” Eddie A. Taveras, state immigration manager for the advocacy group FWD.us , said in a statement.

The legislation, known as the Green Light Bill, expands access to driver’s licenses to an estimated 265,000 undocumented New Yorkers. Supporters say it will create safer roads, increase state revenue and keep families together by preventing traffic violations from turning into deportations.

New York Gov. Andrew Cuomo (D) signed a law Monday that allows undocumented immigrants to get driver’s licenses, a major win for progressives and immigrant rights advocates.

Hans Pennink/AP Photo State Sen. Luis R. Sepulveda (D-Bronx), center, celebrates after the Green Light Bill granting undocumented immigrant driver's licenses was passed by the New York State Senate on Monday. Sepulveda was the main sponsor of this legislation.

The bill, backed by immigrant rights groups and some prominent Democrats, passed the state Assembly last week.

But it faced opposition from within the party as well. The chairman of the New York State Democratic Party, Jay Jacobs, said he warned Long Island’s Democratic senators earlier this month against supporting the Green Light Bill because of potential political consequences, Gothamist reported.

Cuomo hinted as recently as Monday that he might veto the measure, after raising last minute concerns about the possibility of federal government using DMV information to track down undocumented immigrants.

“We have to write a law that does not have an unintended consequences,” Cuomo said in an interview with WAMC radio on Monday.

The state attorney general said the bill’s safeguards prevent it from being “weaponized to be used against undocumented individuals,” Alphonso David, counsel to the governor, said in a statement.

“Governor Cuomo has supported this policy for over a decade,” David said. “The key to this bill is not the political intent but the legal effect. We hope the Attorney General’s assessment is correct for the safety of the thousands of undocumented individuals who are relying on her legal opinion.”

Despite Cuomo’s concerns, the new law won’t create a separate database, said Anu Joshi, the senior director of immigration policy for the New York Immigration Coalition.

“The privacy protections that are included in the bill’s language are the strongest of their time in any bill in the country,” Joshi told HuffPost ahead of the Senate vote.

Undocumented immigrants will be mixed in with everyone else applying for a driver’s license, and the law prevents the DMV from keeping records of original documents. Also, individual judicial warrants would be required for any federal immigration agency requesting information from the DMV.