Michigan Republicans touched off a firestorm Thursday with an abrupt push to pass right-to-work legislation, in what would be a blow to organized labor in the home of the U.S. auto industry.

Right-to-work legislation prohibits unions from forcing workers to pay union dues. Unions and their Democratic allies adamantly oppose these laws — but with little warning, Michigan Republicans on Thursday laid the groundwork to, in a matter of days, make their state the 24th with right-to-work legislation.

“This is all about taking care of the hard-working workers in Michigan, being pro-worker and giving them freedom to make choices,” Michigan Gov. Rick Snyder said. “The goal isn’t to divide Michigan, it is to bring Michigan together.”

The votes Thursday, though, drew hundreds of union-tied protesters to the capital, some of whom were pepper-sprayed by police when they tried to storm the Senate chamber.

Just hours after the bills were introduced, both Republican-controlled chambers approved measures prohibiting private unions from requiring dues. The Senate quickly followed by voting to impose the same requirement on most public unions.

Because of rules requiring a five-day delay between votes in the two chambers on the same legislation, final enactment could not take place until Tuesday at the earliest. Snyder, who previously had said repeatedly that right-to-work was “not on my agenda,” told reporters Thursday he would sign the measures.

Democrats denounced the bills as an attack on worker rights, but the GOP sponsor insisted they would boost the economy and jobs. A House vote on public-sector unions was expected to come later.

A victory in Michigan would give the right-to-work movement its strongest foothold yet in the Rust Belt region, where organized labor already has suffered several body blows. Republicans in Indiana and Wisconsin recently pushed through legislation curbing union rights, sparking massive protests.

Even before the Michigan bills turned up, protesters streamed inside the Capitol preparing for what appeared inevitable after Snyder, House Speaker Jase Bolger and Senate Minority LeaderRandy Richardville announced at a news conference they were putting the issue on a fast track.

Lt. Gov. Brian Calley repeatedly gaveled for order during the Senate debate as Democrats attacked the legislation to applause from protesters in the galley.

Eight people were arrested for resisting and obstructing when they tried to push past two troopers guarding the Senate door, state police Inspector Gene Adamczyk said.

Protesters waved placards and chanted slogans such as “Union buster” and “Right-to-work has got to go.” Adamczyk said the troopers used pepper spray after the people refused to obey orders to stop.

The Capitol, which was temporarily closed because of safety concerns, reopened Thursday afternoon, sending hundreds of protesters streaming back inside.

The decision to push forward in the waning days of the Legislature’s lame-duck session infuriated outnumbered Democrats, who resorted to parliamentary maneuvers to slow action but were powerless to block the bills.

House Democrats did walk out briefly Thursday in protest of the Capitol being closed.

Through a spokesman, President Obama also reiterated his opposition to right-to-work laws.

White House spokesman Matt Lehrich said Obama believes the economy “is stronger when workers get good wages and good benefits, and he opposes attempts to roll back their rights.”

Lehrich said Michigan workers’ role in helping reviving the U.S. auto industry shows “how unions have helped build a strong middle class and a strong American economy.”

Adamczyk estimated that about 2,500 visitors were inside the Capitol, where their shouts reverberated off stone halls and frequently could be heard inside the ornate chambers.

After repeatedly insisting during his first two years in office that right-to-work was not on his agenda, Snyder reversed course Thursday, a month after voters defeated a ballot initiative that would have barred such measures under the state constitution.

In an interview with The Associated Press, Snyder said he had kept the issue at arm’s length while pursuing other programs to bolster the state economy. But he said circumstances had pushed the matter to the forefront.

“It is a divisive issue,” he acknowledged. “But it was already being divisive over the past few weeks, so let’s get this resolved. Let’s reach a conclusion that’s in the best interests of all.”

Also influencing his decision, he said, were reports that some 90 companies had decided to locate in Indiana since that state adopted right-to-work legislation. “That’s thousands of jobs, and we want to have that kind of success in Michigan,” he said.

Snyder and the GOP leaders insisted the legislation was not meant to weaken unions or collective bargaining, saying it would make unions more responsive to their members.

Senate Democratic leader Gretchen Whitmer said she was “livid.”

Republicans have commanding majorities in both chambers — 64-46 in the House and 26-12 in the Senate. Under their rules, only a simple majority of members elected and serving must be present to have a quorum and conduct business. For that reason, Democrats acknowledged that boycotting sessions and going into hiding, as some lawmakers in neighboring Indiana and Wisconsin have done in recent years to stall legislation unpopular with unions, would be futile in Michigan.