On Monday, in a sharply divided 5–4 decision, the Supreme Court prohibited public sector unions from collecting any fees from nonmembers. Its sweeping decision in Janus v. AFSCME reverses 41 years of precedent and overturns laws in the 22 states that have not adopted “right to work” policies. Justice Neil Gorsuch, who has close ties with the groups that bankrolled Janus, cast the decisive fifth vote in favor of hobbling public sector unions. Justice Samuel Alito, a fierce opponent of union rights, authored the majority opinion. His ruling is a massive, possibly fatal blow to the political strength and bargaining abilities of unions across the country.

Janus involves a challenge to agency (or “fair share”) fees. Unlike regular union dues, agency fees may only be used to fund contract negotiations, a function that benefits all employees regardless of their union status. Agency fees may not be used to fund political activities, such as lobbying the legislature. In 1977, the Supreme Court ruled in Abood v. Detroit Board of Education that the Constitution allows public sector unions to collect these fees from members and nonmembers alike. After all, if nonmembers are allowed to opt out of paying agency fees, they become “free riders,” benefiting from the union’s work on their behalf without helping to finance that work.

A majority of states have passed “right to work” laws that allow public sector employees—such as teachers, police officers, and firefighters—to opt out of all union dues. But 22 states still require public sector employees to pay agency fees, and government employees in these states often receive better benefits and salaries. In recent years, however, the Supreme Court’s conservative majority has signaled its eagerness to overturn Abood and impose “right to work” on every state’s public sector. Following Justice Antonin Scalia’s death in 2016, the court deadlocked 4–4 on the question of reversing Abood and abolishing compulsory fair share fees.

Shortly after Gorsuch replaced Scalia, the court agreed to hear Janus, and there was never any doubt that it would issue an opinion kneecapping public sector unions, as it did on Wednesday. Alito’s opinion for the court claims that, by requiring all state employees to furnish funds to a union, the state violates non-members’ First Amendment rights to free speech and association. The process of bargaining for a contract and handling employee grievances, Alito asserted, is itself political speech. Applying “exacting scrutiny” to an Illinois law authorizing compulsory fair share fees, he found that no government interest justified these fees’ “burden on free speech.” Thus, non-union members have a free speech right not to “subsidize private speech on matters of substantial public concern.” Put differently, public sector employees now have a constitutional right to benefit from a union’s representation without financing any of the work it does on their behalf.

Justice Elena Kagan, in a dissent joined by the other three liberals, bridles at the fact that “the majority is bursting with pride over what it has accomplished,” given that they’ve just overturned a 41-year precedent upon which millions of employees currently rely. The court’s decision, she wrote, “will have large-scale consequences”:

There is no sugarcoating today’s opinion. The majority overthrows a decision entrenched in this Nation’s law— and in its economic life—for over 40 years. As a result, it prevents the American people, acting through their state and local officials, from making important choices about workplace governance. And it does so by weaponizing the First Amendment, in a way that unleashes judges, now and in the future, to intervene in economic and regulatory policy.

Kagan added that Janus turns “the First Amendment into a sword,” using it “against workaday economic and regulatory policy.” Speech, she wrote, “is everywhere—a part of every human activity (employment, health care, securities trading, you name it).” She concluded:

For that reason, almost all economic and regulatory policy affects or touches speech. So the majority’s road runs long. And at every stop are black-robed rulers overriding citizens’ choices. The First Amendment was meant for better things. It was meant not to undermine but to protect democratic governance—including over the role of public-sector unions.

Progressives should heed Kagan’s dire warning, particularly in the context of future attacks on unions. While Alito purported to confine his holding to public sector unions, its logic could apply equally to private sector unions. After all, in many states, when a majority of employees at a private company vote to unionize, the laws permit a contract that compels all employees in the bargaining unit to pay union dues as a condition of employment. Given the ruling in Janus, if these dues force anti-union workers to subsidize union activity, how can this contract be constitutionally enforced in court?

Justice Sonia Sotomayor raised this concern during oral arguments, but no one could draw a principled distinction between public and private sector unions on the question of First Amendment rights. In the near future, expect a new lawsuit aiming to turn every state into a full “right to work” state, with the goal of prohibiting any union from collecting dues without affirmative consent.

Although Janus prompted yet another face-off between Alito and Kagan, the most important player here was Gorsuch. Senate Majority Leader Mitch McConnell held open Scalia’s seat for Gorsuch precisely so he could cast the fifth vote in cases like Janus. Given the court’s 4–4 deadlock on this issue in 2016, McConnell very likely had public sector unions in mind when he led the blockade against Judge Merrick Garland then shepherded Gorsuch through the confirmation process. Anti-labor dark money groups spent millions to get Gorsuch on the bench. And on Wednesday, they got what they paid for.