New York has become the 13th state that issues drivers licenses to undocumented immigrants — a list that includes California, Connecticut and Utah — after a raucous four-hour debate in the Senate, followed quickly by Governor Andrew Cuomo quietly signing it into law without ceremony.

Coming on the heels of last week’s rent regulation overhaul, the so-called Green Light Bill again demonstrated the ascendent influence in Albany of liberal activists.

“This landmark legislation will protect a quarter-million immigrant New Yorkers by restoring their ability to obtain driver's licenses, while also making our roads safer, our economies stronger, and our communities healthier for all New Yorkers,” said Steve Choi, Executive Director of the New York Immigration Coalition.

The Coalition, other organizations, religious groups, unions, insurance companies and business leaders all backed the bill, repeatedly filling the Capitol hallways with chanting demonstrators.

And as with other left-leaning initiatives this year, the pull back toward the center was also strong. Most of the six senators on Long Island signaled they were uncomfortable with the bill, citing concerns from police unions — and from one of Cuomo’s top allies, State Democratic Party Chairman Jay Jacobs. Statewide polls showed a gradual increase in support for the licenses, but, still, only a minority wanted to see it become law.

And on Monday the road to passing the bill nearly hit another wall.

Earlier in the day, while the Senate prepared to go to the floor, its leaders declaring they had enough support to pass the bill, Cuomo warned that he had new concerns. Despite his earlier support — two weeks ago he called it a top priority for 2019, recalling that he had backed giving non-citizens drivers licenses since 2007, when he was Attorney General and Eliot Spitzer was governor — Cuomo said he now thought doing so could have “unintended consequences.”

“You could be creating a database for the feds to use to actually track down undocumented people,” Cuomo said in an interview on WAMC.

He said he would ask the state’s Solicitor General, Barbara Underwood, to assess the vulnerability of the new licenses to Immigration and Customs Enforcement. Underwood, who works in the Attorney General’s office, is effectively the state’s top civil lawyer, interpreting the intersection of state and federal legal matters.

“If she says they can access it, I will not sign the bill,” Cuomo said — and then formally requested the legal opinion in a public letter released as the Senate began debating the controversial bill.

It was just Cuomo’s latest showdown with the legislature — and its left wing. Many in the party are committed to expanding protections and privileges for undocumented immigrants, but Cuomo is concerned the inclination could jeopardize Democrats in vulnerable districts.

“He’s quite concerned politically about the bill — so he’s leaving it up to the Attorney General to say there’s something wrong with it,” said Democratic consultant George Arzt. “It’s a wedge issue, with many people who like it, in the liberal world, and many moderates who don’t like it, and that deep split is something that apparently concerns him very much.”

If Cuomo was seeking political cover to reject the bill — as Arzt and many Democrats say — the gambit didn’t work.

While senators emotionally debated what rights, if any, undocumented immigrants should have — “If you don’t want me to call them ‘illegals,’ I’ll just call them criminals,” said Republican Senator Tom O’Mara, from the Southern Tier — Attorney General Leticia James released a statement giving the bill the green light.

“The Office of Attorney General has concluded that it is constitutional,” James said. “The legislation is well crafted and contains ample protections for those who apply for driver’s licenses. If this bill is enacted and challenged in court, we will vigorously defend it.”

(Fred Mogul / Gothamist / WNYC)

Underwood, who briefly served as Attorney General between Eric Schneidermann’s resignation and James’ election, remained silent. An hour later, Cuomo’s office chided the two women.

“The Solicitor General, a former federal prosecutor and former Acting U.S. Solicitor General, who presumably knows whether or not the relevant information can be safeguarded, has remained unresponsive on this critical issue,” Counsel to the Governor Alphonso David, said in a public letter. “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."

In the end, the bill passed the Senate with a narrow 33-vote majority. All six Long Island senators dissented, as did James Skoufis from the Hudson Valley. Brooklyn’s Simcha Felder, a nominal Democrat who caucuses with Republicans, voted in favor.

The law is scheduled to take effect in 180 days.

Fred Mogul is the Albany and politics reporter for WNYC. You can follow him on Twitter @fredmogul.