By evening, two large canopies belonging to the opposing camps lay crumpled on the Capitol lawn, the police said. At least two people were arrested, they said, after trying to press past one of the large clusters of state troopers that stood guard at the George W. Romney Building, which houses the governor’s office. And at least one police officer had used a substance similar to pepper spray during the protests.

“Today is a game changer for Michigan, for its workers and for our future,” said Speaker Jase Bolger, a Republican who helped lead the efforts to make Michigan the nation’s 24th state — and only the second one, along with Indiana, in the traditional Midwestern manufacturing belt — to ban requirements that workers pay fees for union representation.

The legislation here, which will go into effect next year, bans any requirement that most public and private sector employees at unionized workplaces be made to pay dues or other fees to unions. In the past, those who opted not to be union members were often required to pay fees to unions that bargained contracts for all employees at their workplace.

But the change means vastly different things to the two sides. Advocates say that it is attractive to businesses looking to move and that it allows workers to make choices about unions.

“This is the day when Michigan freed its workers,” Lisa Posthumus Lyons, a Republican state representative who said her family included union members, told colleagues during the intense debate on Tuesday, which ended with votes along largely party lines. Last week, the Senate passed the package — one bill dealing with public workers, the other with employees of private companies.

Critics say the legislation encourages workers not to pay union dues (but still gain contract benefits through them), weakens unions and tends to drive down wages.