This week, the Supreme Court doled out victories to three powerful constituents of the Republican coalition. It upheld Donald Trump’s travel ban, sided with anti-abortion campaigners in California, and, on Wednesday, struck down an Illinois law that required public-sector workers to pay fees to unions that cover the cost of organizing collective bargaining, even if they don’t want to join the union proper. This last ruling—which came just hours before Justice Anthony Kennedy, a swing vote on the Court, announced his retirement—delivered a potentially crippling blow to the labor movement and the Democratic Party, with which it is aligned. All three decisions are likely harbingers of what is to come from an even more conservative Supreme Court bench.

The labor-union ruling was particularly noteworthy because it broke with decades of precedent. During the past fifty years, union membership has declined precipitously in the private sector. Only about one in twelve privately employed workers are union members. In the public sector, about a third of the labor force is still unionized. The unions that represent teachers, police officers, government workers, and other public-sector professions are key players in Democratic politics, as well as vital defenders of wages and benefits for middle-class workers. But, in the absence of a legal mandate to pay dues, individual members of these unions will have a clear incentive to “free ride” on the efforts and payments of others. In such a situation, union membership can quickly unravel.

Recognizing this logic, the Supreme Court ruled in 1977’s Abood v. Detroit Board of Education that unions could collect “agency fees” even from public-sector workers who didn’t want to join a union. These fees, which are a bit lower than typical union dues, are supposed to cover the costs of everything that the union does, except for its political activities. In the years after 1977, the basis of the Abood ruling was challenged a number of times, but without much success. As recently as ten years ago, the Court found that the Abood ruling was based on sound constitutional principles.

The ruling on Wednesday didn’t come about by accident, however. It marks the culmination of a decades-long anti-union campaign by conservative groups and billionaires tied to the Republican Party, such as the Koch brothers, the Uihlein family, and their allies. By funnelling money through tax-exempt organizations like the National Right to Work Legal Defense Foundation, the Liberty Justice Center, and the Center for Individual Rights, these ultra-wealthy people have helped to finance a series of legal attacks on labor unions that represent ordinary working people who earn modest wages. Faced with the formidable challenge of overturning what most experts regarded as settled law, the well-funded union haters persisted, and eventually they found a court that was willing to overturn precedent: the John Roberts–Neil Gorsuch high court.

The case at the center of Wednesday’s ruling is Janus v. A.F.S.C.M.E. It was filed by Mark Janus, a child-support specialist at the Illinois Department of Healthcare and Family Services who objected to paying monthly union dues of roughly forty-five dollars. Janus’s lawyers claimed that the agency fees violated his constitutional rights. They argued that when public-sector labor unions bargain over things like salaries and pensions, they are engaging in a form of political speech that is designed to influence government policy, and that forcing Janus to help pay for this form of speech, even when he might have disagreed with the union’s stances, was a violation of the First Amendment.

In March of last year, the U.S. Court of Appeals for the Seventh District rejected these arguments, citing the Abood judgment. But Justice Samuel Alito, writing for the majority, not only accepted the First Amendment argument, he resoundingly endorsed it. Citing union efforts to resist government cuts, and the involvement of teachers’ unions on issues like merit pay, he argued that many of the stances that public-sector unions take are intrinsically political. “Fundamental free speech rights are at stake,” he wrote. “Abood was poorly reasoned. It has led to practical problems and abuse. It is inconsistent with other First Amendment cases and has been undermined by more recent decisions.”

These decisions, which chipped away at Abood without overturning it, were made by Alito and his colleagues on the previous Roberts-Antonin Scalia court. After Scalia died, in 2016, the court deadlocked on union-dues cases. But when Trump nominated Neil Gorsuch, a member of the conservative Federalist Society, to replace Scalia, it was pretty clear that the Abood judgment was living on borrowed time. On Wednesday, the five conservative Justices delivered the death blow in a 5–4 decision.

Writing for the minority, Justice Elena Kagan pointed out that the majority was proceeding regardless of law and precedent. “Over four decades, this Court has cited Abood favorably many times, and has affirmed and applied its central distinction between the costs of collective bargaining (which the government can charge to all employees) and those of political activities (which it cannot),” Kagan noted. In a thunderous conclusion, she said, “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.”

For years, conservatives complained about activist liberal judges making it up as they went along. Today, they are the activists. Under the guise of “originalism,” they are rewriting the nation’s laws to further the reactionary political agenda of the Republican Party and its biggest donors. The process is a gradual one, and in some cases the Robert-Gorsuch court has held back, or temporized. But in the final week of this term it has shown its true colors. Once Trump finds another Gorsuch to replace Kennedy, whose retirement is effective July 31st, there may be no stopping the rightward lurch.