ALBANY — The New York State Senate approved a bill on Monday to grant driver’s licenses to undocumented immigrants, a deeply polarizing issue that had splintered Democrats and stirred a backlash among Republicans in New York and beyond, who have already vowed to highlight it during next year’s elections .

The vote, together with the Assembly’s passage last week, thrust New York into the center of the explosive national debate over immigration. It would reverse a nearly 20-year-old ban and end years of political paralysis on the issue.

It also signaled the strength of the progressive wing of the Democratic Party, which for months had pressed moderate legislators to support the bill despite concerns about alienating swing voters, especially among first-term Democrats who flipped seats on Long Island and helped their party win a majority last year.

As recently as last week, resistance from those new legislators had stalled the bill. But with three days remaining in the legislative session, a combination of aggressive activism, emotional appeals and last-minute affirmations from some of those lawmakers helped usher through the proposal.