The Supreme Court dealt a serious blow to public sector unions Monday, limiting their ability to automatically deduct dues from public workers who nevertheless benefit from union-negotiated contracts. The ruling fell along ideological lines, with the five conservative justices in the majority and the four Democratic appointees in dissent.

“This case presents the question whether the First Amendment permits a State to compel personal care providers to subsidize speech on matters of public concern by a union that they do not wish to join or support,” wrote Justice Samuel Alito for the majority. “If we accepted Illinois’ argument, we would approve an unprecedented violation of the bedrock principle that, except perhaps in the rarest of circumstances, no person in this country may be compelled to subsidize speech by a third party that he or she does not wish to support.”

The ruling is a substantial setback to public sector unions, a bulwark of organized labor’s fading power, a key constituency for the Democratic Party, and a top target for the conservative movement. The White House, in a statement, said the decision “will not only make it significantly harder for these dedicated employees to get a fair shake in exchange for their hard work, but will make it harder for states and cities to ensure the elderly and Americans with disabilities get the care they need and deserve.”

In 2003, Illinois passed a law that substantially strengthened the unions by recognizing home health-care workers providing rehabilitation services as public employees and allowing them to be represented by the Service Employees International Union. The workers are paid through the federally funded Medicaid program, but the court ruled that they are “partial public employees” and therefore can’t be compelled to contribute to the unions.

“Other than providing compensation, the State’s role is comparatively small,” Alito wrote.

The workers weren’t compelled to join the union, but even if they didn’t money was deducted out of their paycheck to pay union dues, because the union ultimately represents them in negotiations with management over pay and working conditions – by law the money cannot be used for the union’s political activities.

In 2009, Illinois Democratic Gov. Pat Quinn added a new category of home health-care workers, those performing disability services, to those eligible for unionization.

The law was challenged by a group of home health-care workers who didn’t want to pay union dues and argued being forced to violated their First Amendment rights, a cause that was then taken up by the anti-labor National Right To Work Legal Defense Foundation.

A 1977 Supreme Court decision, Abood v. Detroit Board of Education, upheld automatic deduction of dues as long as the money is not used for political purposes.

At oral argument, the group urged the justices to overturn that decision. The court did not do so – though the majority refers to its “foundations” as “questionable” – but it did make it substantially harder for public sector unions to organize.

“The good news out of this case is clear: The majority declined that radical request. The Court did not, as the petitioners wanted, deprive every state and local government, in the management of their employees and programs, of the tool that many have thought necessary and appropriate to make collective bargaining work,” wrote Justice Elena Kagan in a dissent joined by the other Democratic appointees. “The bad news is just as simple: The majority robbed Illinois of that choice in administering its in-home care program.”

The Roberts court has in the past offered warnings of its future intentions to gut prior precedents or laws that have been upheld, such as when it upheld a key section of the Voting Rights Act in 2009 before striking it down in 2013. By calling the Abood decision “questionable,” the conservative majority may very well be signalling its intention to overrule it in the future.

So Kagan’s “good news” might be quite temporary.