Just hours after they were introduced, both chambers approved measures prohibiting private unions from requiring that nonunion employees pay fees. The Senate quickly followed by voting to impose the same requirement on most public unions.

Although rumors had circulated for weeks that right-to-work measures might surface during the session’s waning days, the speed with which the GOP-dominated Legislature acted Thursday caught many onlookers by surprise. Details of the bills weren’t made publicly available until they were read aloud on both floors as debate began.

The chaos drew raucous protests from hundreds of union supporters, some of whom were pepper-sprayed by police when they tried to storm the Senate chamber.

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. Republican Gov. Rick 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 Leader Randy Richardville announced at a news conference they were putting the issue on a fast track.