The largest public-sector unions in the country may lose up to 400,000 fee payers after the Supreme Court declared mandatory payments unconstitutional. The decision could cut into the coffers of the Democratic Party.

On Wednesday the Supreme Court ruled that government agencies could no longer require workers to pay union dues or fees as a condition of employment. The 5-4 ruling, which overturned the 1977 Abood precedent allowing unions to charge "fair share fees" to all workers, including nonmembers, could deal a devastating blow to the coffers of unions. The ruling gives agency fee payers—those who pay partial dues supposed to cover expenses like grievances and collective bargaining rather than political activities—the ability to halt all payments to unions. The Service Employees International Union (SEIU), American Federation of State, County, & Municipal Employees (AFSCME), National Education Association (NEA), and American Federation of Teachers (AFT) represent millions of government employees at the state and local level, as well as about 400,000 agency fee payers, though not all of them are directly affected by the decision, according to 2017 federal labor filings.

Todd Lyon, a management-side attorney with Fisher Phillips, has represented several employers engaged in negotiations with public-sector unions. He expects the loss of revenue from agency fee payments to take a toll, with major cuts coming to payroll, political lobbying, and campaign spending.

"The ruling will decrease the funds available for unions, so we'll see a rash of layoffs within the unions themselves. Thats going to lead to a decrease in the advocacy," Lyon said. "There's going to be a decrease in the political activity."

AFSCME, SEIU, AFT, and NEA universally condemned the ruling as an attack on workers following the release of the opinion on Wednesday, but no spokesman returned requests for comment.

The four unions combined to spend more than $1 billion on political activities since 2012, according to federal labor filings. Those records represent a conservative estimate on public-sector union spending, since they do not count the spending rates of local unions or state chapters on such activities. Nearly all of the unions' federal political contributions went to Democrats or advanced liberal causes, according to the Center for Responsive Politics.

Political activities played an essential role in the lawsuit filed by a group of Illinois government employees who launched the Janus case. They argued before the Court that government unions are inherently political since they affect public policy and budgeting of taxpayer dollars. Justice Samuel Alito agreed, saying that those workers should not be forced to endorse political speech with which they disagree.

"The State's extraction of agency fees from nonconsenting public-sector employees violates the First Amendment," the ruling said. "Forcing free and independent individuals to endorse ideas they find objectionable raises serious First Amendment concerns."

Labor watchdogs are now working to inform workers of their rights under the Janus decision. The Michigan-based Mackinac Center for Public Policy has committed $10 million to a campaign designed to help fee payers exercise their rights to opt out of union fees, while the National Right to Work Foundation has launched a website to keep workers updated on the process of halting union payments. Mackinac labor expert Vinnie Vernuccio said the ruling was a major win for employees disconnected from the ideology of labor leaders. Agency fee payers are just the start—full-paying dues members in these unions could begin withdrawing their membership now that their jobs are no longer at risk, according to Vernuccio.

"Unions must present evidence that public employees want to waive their First Amendment rights before having the state deduct dues," he said. "The decision freed people … government unions can no longer get public employees fired for not paying them."

Jeffrey Cimmino contributed to this report.