J. Scott Applewhite / AP

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. Without fair-share fees, economists argued then and now, union members have an incentive to become "free-riders," benefiting from collective bargaining but not paying for it. Mark Janus, an employee of the Illinois Department of Healthcare and Family Services, argued, however, that his union's attempts to negotiate on behalf of him did not take into account the fiscal crises in Illinois; he basically disagreed with the union's position in trying to negotiate for higher wages and benefits. The majority opinion in Janus, written by Justice Samuel Alito, rules that states and public-sector unions "may no longer extract agency fees from nonconsenting employees ... The procedure violates the First Amendment and cannot continue."

The dissenting opinion, written by Justice Elena Kagan, argues that the Abood decision already ensured that the fees collected by unions only cover collective bargaining, and not political and ideological activities. Kagan's opinion expresses skepticism that the Court overturned a previous decision, deeply entrenched in the real world, with little justification. It does so, Kagan writes, "by weaponizing the First Amendment, in a way that unleashes judges, now and in the future, to intervene in economic and regulatory policy."

A study by Frank Manzo, the policy director of the Illinois Economic Policy Institute, and Robert Bruno, a labor professor at the University of Illinois at Urbana-Champaign, found that a decision in favor of Janus could reduce the union membership of state and local government employees by 8.2 percentage points, or 726,000 union members. This will lead to a loss of revenues for the unions, and with less money, unions will hire fewer representatives,  take fewer cases to arbitration, and organize fewer members than they once did, Bruno told me. This will likely mean lower pay and benefits for public-sector employees: Manzo and Bruno estimate the wages of state and local government employees would drop by an average of 3.6 percent, and the salaries of public-school teachers would drop by an average of 5.4 percent. The decision could also mean that unions will have less political impact than they once did. The decline of unions has already had implications for national politics: Some analyses argue that Hillary Clinton would have been elected president had union membership been higher.

The upcoming struggle for unions is something the justices recognize. "We recognize that the loss of payments from nonmembers may cause unions to experience unpleasant transition costs in the short term, and may require unions to make adjustments in order to attract and retain members," Alito writes. Yet, he argues, unions have long earned money from nonconsenting members. "It is hard to estimate how many billions of dollars have been taken from nonmembers and transferred to public-sector unions in violation of the First Amendment," he writes.

Still, labor and liberals had long anticipated this ruling; in her dissent, Kagan calls out her fellow justices over their "6-year-campaign to reverse Abood." The labor movement has been trying to prepare for this decision, and say that Janus does not have to be the end of public-sector unions in America. In some states that have turned right-to-work or passed laws restricting unions' power in recent years, unions have been able to continue to add members and convince people to pay dues, they say. "The reports of our death are greatly exaggerated," Randi Weingarten, the president of the 1.7 million-member American Federation of Teachers, told me earlier this month.

A small segment of labor faced a similar challenge a few years ago. After Pamela Harris, a personal-care assistant in Illinois represented by a branch of the Service Employees International Union, sued Illinois Governor Pat Quinn and the union, claiming that fair-share fees violated her freedom of speech and freedom of association rights, the Supreme Court ruled in Harris v. Quinn in 2014 that requiring home health aids to pay fair-share fees violated their First Amendment right to free speech. That case did for home-care workers in 2014 what the Janus ruling now does for all public-sector unions: It immediately ended unions' ability to collect fees from people who did not choose to become members of the union. Today, though, the United Domestic Workers of America (UDW), which represents home-care workers in California, has more members than it did before Harris v. Quinn, Doug Moore, the executive director of UDW, told me. The union had 68,000 members before the ruling, and in 2014, it dropped down to 48,000 immediately after the ruling. Today, it has 75,000 dues-paying members. "You cannot only survive in a right-to-work environment, you can thrive," he said. UDW may be a model for what other public-sector unions will have to do in a post-Janus world.

The UDW had a particularly steep challenge: Home health-care workers do not go into a central worksite where they can be easily reached by organizers. So the union deployed technology to reach members, sending out staffers with iPads to go to worksites and talk to members about signing up. They used software that allowed potential members to join via voice authorization after a phone call discussing union membership. They created a mobile app to help members do their jobs, track their paychecks, and appeal for more hours of care for their clients, and started targeting potential members with Facebook ads.

The union quickly learned that just talking about their ability to bargain for members' wages was not enough to convince people to pay the dues, which ranged from about $10 to $40 per month. UDW had to prove it was providing a valuable service to members and their clients that went above and beyond bargaining over pay, Moore said. It launched a home-care registry after Harris v. Quinn that matched workers with potential employers, and started offering free CPR and dietary classes to discuss with workers how to feed clients with special dietary needs. It got involved in advocating on issues that affected members, like immigration reform and bail reform. It held meetings so that isolated members could meet each other and talk about issues that affected them. And it did all this on a budget that was 30 percent lower than what it had been before the decision. "We really had to think about marketing ourselves to our members—that was something new," he said.

Of course, it's possible that, absent Harris v. Quinn, UDW would have even more members than it currently does. Though the union has added 7,000 dues-paying members since 2014, the number of potential members has also grown significantly because of the aging population. Around 75,000 of 108,000 potential home-care workers in California have chosen to pay dues to the UDW.

Cherita Kennedy is one of them. Kennedy, 34, lives in Stanislaus County, an inland part of California, where she cares for her mother and grandmother, who have mental and physical disabilities. She signed up for the UDW last year, and pays about $29 a month in dues. That's not an insignificant amount of money for her—she works 80 to 150 hours a week, making $11.50 an hour. But she said she decided to pay fees because UDW provides her with services that would cost her a lot more to pay for individually. "I get representation from someone who personally understands my situation," she told me. She joined last year, after she got a call from a UDW rep asking her if she wanted to attend a local CPR workshop. She ended up attending a workshop on workplace violence prevention, and enjoyed meeting and talking to other union members. She decided to join the union because she felt that it kept her up-to-date on policy changes affecting her job. UDW advocates on behalf of people like her, she told me, fighting policies that would make her job worse. Paying a lawyer or lobbyist to make her job better would be expensive, she said, so paying union dues is a bargain.

Many public-sector unions have been preparing to reengage their members, just as the UDW did. In some ways, this is a political moment that may make it a little easier for unions. In many states across the country, public-sector workers are frustrated with cuts to government spending, and have banded together to organize in opposition to those cuts. Teachers have walked out of classrooms in West Virginia, North Carolina, Colorado, Kentucky, Oklahoma, and Arizona, to protest salaries that haven't kept pace with inflation. The Trump administration has similarly issued executive orders that seem aimed at weakening unions, which could also motivate workers to join or rejoin unions.

"The '16 election and Betsy DeVos's appointment was a jolt to a lot of people," Weingarten told me. "I think it motivated a lot of people who had sat on the sidelines into saying, 'If not us, who, if not now, when?'"

In West Virginia, for instance, the American Federation of Teachers (AFT) has added 1,250 members after the walkout there, even though the state is right-to-work, which means that employers cannot require union membership as a condition of employment. In Florida, a right-to-work state, the AFT has 7,400 more members than it did a year ago. Membership in the National Education Association is up 1.1 percent across all states, but 2.2 in walkout states, according to Jim Testerman, the senior director at the NEA's Center for Organizing.

The unions have also had very concentrated campaigns in advance of Janus to get members involved. The American Federation of Teachers is having one-on-one meetings with members and potential members, asking them to sign "recommit" cards in 10 states to promise that they'll continue to be union members. The union currently has 530,000 recommits, a spokesman told me. (It has 1.7 million members.) One Toledo union has 100 percent of its members recommit, Weingarten said. Similarly, the National Education Association, or NEA, is reaching out to members and trying to convince them that a union can help them fight for racial justice and equal distribution of resources, rather than just for salary wages, according to Testerman. Members are motivated to join when they think about how unions will be advocates for teachers and the communities they serve. "When people actually see a movement that is giving voice to their profession and their students, they join their union," he told me.

Left-leaning states have also tried to prepare for Janus by passing laws that will make it easier for unions to recruit members, even if they can't collect agency fees. In California, for example, unions now have the right, thanks to a new law, to meet with new public employees as soon as they start working. A second new law keeps private the phone numbers and email addresses of employees of public agencies, so that anti-union groups will have a harder time convincing them to drop out of unions.

Despite these efforts, there will almost definitely be some drop-off after Janus. The NEA is budgeting for a 15 percent decrease in revenues next year, for example. The question is how much unions can successfully delay membership declines. Some of this may also depend on what's next for the anti-labor movement. In Wisconsin, for instance, once a labor movement stronghold, an initial anti-union foray led to more laws passed that hamstrung labor. First, in 2011, Governor Scott Walker passed Act 10, which dramatically curtailed collective bargaining for most public-sector workers and required that unions be "recertified" every year by a majority of people eligible to vote, counting people who didn't vote as a "no." Wisconsin then became a right-to-work state in 2015, preventing unions from collecting fair-share fees from private-sector employees who chose not to join the union. The crippling and nonstop attacks on unions has led to a dramatic decline in unions in Wisconsin—in 2011, 13.3 percent of workers were members of unions; today, just 8.3 percent are. This has also led to a drop in salaries and benefits. Median salaries for teachers in Wisconsin fell 12.6 percent, or $10,843 dollars, between 2012 and 2015.

Yet improbably, even union members in Wisconsin say that the worst days are behind them. As I talked to union representatives, a few referred me to the Milwaukee Teachers' Education Association, which they said had been successful at surviving the onslaught of anti-union legislation. Success is relative in a place where conservatives are in charge. Before Act 10, MTEA had 7,500 dues-paying members, Amy Mizialko, a vice president at the union, told me. Today, it has about 4,800. But MTEA has been focused on building a better union that is focused not just on wages and benefits, which it isn't allowed to bargain for, but instead on social justice and issues that are important to teachers. The union has gotten more teachers involved by talking not just about the union benefits teachers, but also how it benefits students.

"Our students' welfare and life chances are dependent in many ways on the educators of this district refusing to succumb to the assault on public school educators," Mizialko, a former special-education teacher, who saw her pay and benefits drop $10,000 after Act 10, told me.  

The union has organized on behalf of issues that affect students: reversing a state requirement limiting recess and getting the district to agree to smaller class sizes. It has convinced the School Board in Milwaukee to declare the district a sanctuary district, meaning it will oppose efforts to detain and deport undocumented students. And while it may be smaller than it was before Act 10, and before a national assault on unions statewide, it still exists. And it will only get stronger, Mizialko said. "My belief is that we will be on better footing, and firmer ground, five years from now," she said. Labor is hoping that other unions across the country, facing similar headwinds, will also be able to say the same.

Alana Semuels is a staff writer at The Atlantic. She was previously a national correspondent for the Los Angeles Times.