The statewide teachers’ strike that closed West Virginia schools for nine consecutive days moved closer to resolution on Tuesday when the state legislature passed a bill to give all state workers—not just teachers—a 5% pay raise.

The strike has garnered national attention far beyond the Mountain State, which is ranked 48th among states in teacher pay and is the third poorest state by median income level. As some schools resumed on Wednesday, the example set by the 20,000 striking teachers has lasting instructive value for workers around the country fighting for their rights.

What makes the teachers’ victory even more astonishing is that their strike is technically illegal. A work stoppage taken by unionized workers, like the West Virginia teachers, without the authorization, support, or approval of their union leadership is known as a “wildcat strike.” Under the 1935 National Labor Relations Act, federal courts have held that wildcat strikes are unlawful and that employers may fire workers participating in them with impunity.

In the Fourth Circuit, in which West Virginia is located, the court held in NLRB v. Draper Corp. in 1944 that nothing in the NLRA protected workers engaging in wildcat strikes from an employer’s discharge. In fact, in Consolidation Coal Co. v. United Mineworkers of America in 1982, the court held that union officials could even be fined for failing to take reasonable measures to end a wildcat strike. (See more about the legal history of mass picketing and other forms of labor protest in “Workers Disarmed: The Campaign Against Mass Picketing and the Dilemma of Liberal Labor Rights” by Ahmed A. White in Vol. 48 of the Harvard Civil Rights-Civil Liberties Law Review.)

Wildcat strikes have historically been used to win civil rights victories when times are toughest. The Memphis sanitation workers’ strike, one of the most important struggles of the 1960s Civil Rights Movement, began as a wildcat action. West Virginia itself has a proud history of wildcats, including a 23-day Black Lung Strike by miners in 1969 that led to the passage of a federal law creating stricter safety standards and workers’ compensation for black lung.

Despite its radical labor history, West Virginia passed “right-to-work” legislation in 2016,. Such laws make it harder for unions to sustain themselves financially by not requiring workers to pay dues in exchange for the union’s representation. Although state laws like West Virginia’s currently only apply to private sector workers, the upcoming Janus v. AFSCME decision before the Supreme Court threatens to turn the entire public sector nationwide into a “right-to-work” zone. (See more about “right-to-work” laws in “The Deregulatory First Amendment at Work” by Charlotte Garden in Vol. 51 of the Harvard Civil Rights-Civil Liberties Law Review.)

Why were West Virginia teachers willing to risk their livelihoods by breaking the law? The teachers had not had an across-the-board raise in four years, even as their health coverage kept getting cut. Pushed to the brink by low pay, rising health care costs ultimately propelled them to strike, joined by school service workers and even some of their own superintendents.

On February 27, five days after the strike started, union leaders announced a deal they made with the governor for a 5% pay increase for teachers, a 3% pay increase for other state service workers, and the creation of a health insurance task force. But the teachers didn’t want a task force on health care; they wanted affordable health care. And because of their sheer numbers and the strength of their solidarity, they decided to stay on strike until they won.

As public sector workers are under attack on every front—by President Trump, at the Supreme Court, and in state legislatures—the courage of the West Virginia teachers is instructive. Their solidarity with each other, their fellow public employees, and their students is an encouraging example in a challenging time when things are likely to get worse.

In fact, the West Virginia wildcat strike is already inspiring teachers in places like Oklahoma, which is ranked dead last among states in teacher pay. Oklahoma’s education budget is so starved that many of its schools operate only four days a week, and teachers haven’t gotten a raise in ten years. Educators there are now discussing a statewide strike of their own.

The West Virginia teachers have shown that in their repeated attacks on the public sector, anti-worker lawmakers in West Virginia and across the country may have inadvertently galvanized a movement that is stronger and more powerful than they could have imagined.

The night before he was assassinated in Memphis, Martin Luther King, Jr., delivered his famous “I’ve Been to the Mountaintop” speech to a gathering of the striking sanitation workers. The teachers of the Mountain State carry on that legacy.