The Supreme Court Wednesday dealt a huge blow to public-sector unions and the labor movement in general, ruling in Janus v. AFSCME that public employees do not have to pay fees to unions to cover the costs of collective bargaining. The court, split along partisan lines, overruled 41 years of precedent in deciding that requiring employees to pay fees violates their First Amendment rights.

With the decision, public-sector employees around the nation will no longer have to pay fees or dues to their unions, even if those unions collectively bargain on behalf of those employees—likely impacting union membership and revenues nationwide. Until now, 22 states had in place a so-called “fair share” provision, which required people represented by unions who did not choose to be members of these unions to pay fees to cover the cost of the unions’ collective bargaining activities. By contrast, 28 states were so-called “right-to-work” states, and barred employers from including “fair share” requirements in employment contracts.

The Janus decision immediately makes null the fair-share provisions, overturning a 1977 case, Abood v. Detroit Board of Education. In that case, public-school teachers in Detroit who opposed public-sector collective bargaining argued that they should not have to pay fees to the union. The Abood decision prohibited public-sector fees from using union fair-share fees for political causes like lobbying, but found that unions could use those fees to cover the cost of collective bargaining, which produced economic gains for union members.