Democrats seized control of the New York State Senate for just the third time in 50 years on Tuesday, a victory that could fundamentally alter the state’s economic and political fabric next year and beyond.

The Senate had been the Republican Party’s last foothold of power in an increasingly blue state. But after a closely watched, expensive battle, Democrats won eight Republican-held seats, giving their party decisive command of Albany’s triumvirate of power and positioning them to unleash a cascade of long-stymied progressive legislation.

Democrats had needed to flip only one seat to erase the Republicans’ razor-thin majority. They blew past that number, unseating five incumbents and winning three open seats.

“Thank you for sending us our biggest majority ever,” Senator Andrea Stewart-Cousins, the leader of the Senate Democrats, told supporters on Long Island.