The school of education at the University of Wisconsin-Madison never used to have trouble attracting applicants with dreams of becoming teachers. Its graduate program is ranked fourth in the country by U.S. News & World Report, and until recently, its undergraduate program in elementary education typically received between 300 and 400 applications for its 125 spots. Now, says Michael Apple, a professor in the program, it only gets about one applicant per opening.

What happened? Scott Walker became Wisconsin’s governor in 2011 and promptly enacted a wide-scale rollback of unionization rights for state employees. That law, Act 10, effectively wiped out the ability of teachers and other public-sector workers to bargain collectively over salary and benefits.

Walker’s assault on unions has had well-publicized effects, including an unsuccessful recall election against him, a sharp reduction in union membership, and a proliferation of anti-union legislation in other states. Unions’ diminished organizing power for Democrats helped Donald Trump become the first Republican presidential candidate to win Wisconsin in more than 30 years. But less visible consequences have colored nearly every facet of Wisconsin society. One is a sudden and drastic teacher shortage. “The attack on teacher unions has an echo that is often invisible,” Apple says. “That invisibility is many fewer teachers.”

Wisconsin teachers now earn less total compensation than they did seven years ago, thanks to cuts in benefits. They face larger classes and less job security, and in some districts they’ve been asked to teach extra sections. Fewer people are applying to teacher education programs. One Wisconsin education student, who asked not to be named to avoid hurting his job prospects, warns that “better conditions and job security will lead some of us elsewhere.”

The downturn for Wisconsin teachers is so bad that when a Minnesota public school district sent representatives to a job fair at UW-Madison’s education school last fall, they made a point of boasting about the benefits their state still offered. “I actually heard them promote having unions as a sales pitch, which I found interesting coming from administrators,” says the student.

That Wisconsin is the front of the war on unions is particularly poignant. The American Federation of State, County and Municipal Employees (AFSCME), which represents public workers at all levels of government, began as an association of local workers in Madison in 1932. Twenty-seven years later, Wisconsin became the first state to recognize state government employee unions. But when Walker signed Act 10 on March 11, 2011, that long chapter of progressivism came to an end and the state became a radical experiment in the opposite direction.

The battle over the law was as dramatic as its effects: The entire 14-person Democratic caucus in the state Senate fled to Illinois in a bid to prevent it from passing, and about 100,000 union advocates demonstrated, with some camping in the hallways of the Capitol and singing union anthems. Teachers protested by calling in sick, and schools were forced to close.

In the end, it wasn’t enough. Act 10 prevailed and other conservative state governments soon followed with their own anti-union legislation. It attacked public-sector unions from a variety of angles. Wisconsin workers can no longer negotiate to improve their health or retirement benefits. Raises can’t exceed the rate of inflation. Job-security measures like tenure were tossed aside, and managers were given the freedom to fire employees at will. Dues are no longer deducted directly from paychecks, forcing public-sector unions to track down members individually to raise funds.

At the time, Walker sold Act 10 as a way to close a $3.6 billion budget gap. But there was never much question that the real motivation was to hobble liberal causes. A video later surfaced showing Walker hobnobbing with billionaire donor Diane Hendricks, founder and chairwoman of Wisconsin-based ABC Supply, two weeks after taking office. “Any chance we’ll ever get to be a completely red state and work on these unions and become a right-to-work?” she asked. (So-called right-to-work laws slash union revenue by prohibiting unions from compelling employees to pay dues, allowing employees to benefit from a union’s efforts without contributing their share.) Walker replied, “The first step is, we’re going to deal with collective bargaining for all public employee unions, because you use divide and conquer.”

That strategy could soon become national policy. Former House Speaker Newt Gingrich, a Trump adviser, has pointed to Walker’s anti-union crusade as a model for how the new administration could target public-­sector unions at the federal level. Trump’s pick for education secretary, Betsy DeVos, chaired a group called the American Federation for Children, which claims it has spent more than $4.2 million on Wisconsin races since 2010. The AFC tapped Walker as its keynote speaker at the group’s 2015 policy summit.

“Scott Walker just won the presidential race in 2016 by passing Act 10 five years ago.”

Six years after the passage of Act 10, a small band of retirees still gathers in the Capitol rotunda every weekday at noon for a pro-union Solidarity Sing-Along. But it barely draws the attention of passing school groups, let alone lawmakers. State labor organizations, struggling to maintain their membership rolls, have little time or money to press legislators for policy changes. One AFSCME council saw its budget drop from $5 million before Act 10 to $1.5 million in 2013.

Before Walker’s crusade, 14.2 percent of Wisconsin’s workforce belonged to a union. By 2015, that figure had dropped to 8.3 percent, significantly below the national average for the first time. That year, Walker and the Legislature passed a law that extended the right-to-work provisions to private-sector unions as well. That law’s central provision is still on hold pending legal challenges.

It’s no coincidence that 2016 was the first election in which the state voted Republican for president since Ronald Reagan. According to exit polls, Hillary Clinton won union households in the state by 10 percentage points. But 79 percent of voters didn’t belong to a union household, and they went in Trump’s favor by 8 points—enough to deliver him a surprise victory in Wisconsin. “Scott Walker just won the presidential race in 2016 by passing Act 10 five years ago,” anti-tax crusader Grover Norquist tweeted on election night.

Teachers’ unions have been hit hardest. Prior to the law, the Wisconsin Education Association Council (WEAC)—the state’s largest association of local teachers’ unions and an affiliate of the National Education Association—counted about 98,000 members. Now it has fewer than 40,000. The WEAC spent $93,481 on lobbying in 2015, compared with more than $2.2 million in 2011. The union recently put its Madison headquarters up for sale to shore up its finances.

As unions have lost their sway, teaching has become a less attractive profession. School districts have struggled to hire and retain teachers. A study from the Milwaukee-based Public Policy Forum found that between the 2008-09 and 2013-14 school years, the number of people entering Wisconsin teacher-training programs declined by 28 percent and the number of teachers in the state dropped by 2.4 percent, even as the number of students remained nearly constant. In 2013, schools attracted an average of 4.9 applicants per open teaching position, according to data from the Wisconsin Education Career Access Network. By 2015, that average had dipped to 3.3 applicants. Last August, with the start of the school year weeks away, state Superintendent Tony Evers was forced to offer more emergency one-year teaching licenses in order to expand the pool of applicants.

Act 10 has thinned the ranks of both veteran teachers and younger ones. Thanks to the old collective bargaining agreements, Wisconsin teachers used to enjoy generous benefits that allowed people to retire at age 55 and receive a full pension, though many teachers continued teaching into their 60s. But Act 10 threatened to strip away those benefits once the agreements expired, leading many teachers who were eligible for retirement to make their exit years earlier than planned. “We lost a lot of people who developed the expertise over the years to reach kids at their various learning styles,” says John Matthews, who led Madison’s teachers’ union for 48 years. “Those people were leaving en masse.”

The teachers who remain, meanwhile, have been forced to take on extra work to make up for the shortage. The La Crosse school district, for example, tried to solve budget problems by saddling its newest high school teachers with an additional class, at the expense of time spent developing a curriculum and grading papers. John Havlicek, a Spanish teacher in his 21st year and a union representative, says he’s never seen so few teachers take on secondary roles as coaches—they simply don’t have the time for sports. “Within two years, you had teachers leaving because they just couldn’t keep up,” Havlicek says. “It doesn’t seem like it, but 30 more kids and one less period in which to help kids who come in for help was a double whammy.” (The school district is rolling back the change after pressure from teachers and parents.)

In 2011, Walker signed legislation that cut the state’s K-12 education funding by $792 million over two years. If districts want to increase taxes for school funding, they’re required to hold referendums. Last November, 67 such measures were on ballots across the state, with 55 passing. Schools are also getting crunched by state Republicans’ zeal for voucher programs that use public funds to send students to religious and other private schools. Walker has called vouchers a “moral imperative” and expanded their use in 2015, lifting income caps for families to qualify. That year, the Wisconsin Department of Public Instruction warned that school districts would receive less funding because of the voucher program. In the two years since, those schools have lost $41.4 million.

“The shortage of money is causing class sizes to be larger than they should be,” Matthews says. “It’s causing teachers not to have the resources like new textbooks, workbooks. Those resources just aren’t there. And there’s been a cutback in assistance work in the classrooms, a cutback in music, art, and phys-ed teachers. It’s hit the quality of education.”

“I’m from Wisconsin. I’m from your future. There’s some lessons to learn.”

With unions diminished at the state level, conservatives have shifted their attention to weakening them and their influence in liberal cities where they remain relatively strong. In the old manufacturing city of Kenosha, the school board continued to negotiate with the local teachers’ union, although it didn’t have to under Act 10. So in a 2014 election, Americans for Prosperity—­the main political arm of the Koch brothers—got involved in the school board race, in which two seats held by vocally pro-union members were up for grabs. The group set up phone banks and sent people campaigning door to door. The incumbents were replaced with anti-union candidates.

Act 10 requires annual recertification elections in which at least 51 percent of all eligible members—including those who don’t show up—must vote in favor of a union to keep the chapter alive. Bob Peterson, the head of the Milwaukee teachers’ union from 2011 to 2015, says these annual elections can cost thousands of dollars and force unions to run full-scale phone-banking operations. Last year, 11 WEAC affiliates lost recertification votes. In the small eastern Wisconsin town of New Holstein, all 42 teachers who voted backed recertification, but there were another 42 members who didn’t vote, so the local union disappeared.

Peterson has warned his peers in other states for years that Wisconsin could be the test case for the country. “I generally start out by saying, ‘I’m from Wisconsin,'” he explains. “‘I’m from your future. There’s some lessons to learn.’ I sort of thought I was exaggerating, but with the Trump election I don’t think I was. What has gone on in Wisconsin for the last five and a half years is what very well could happen nationwide.”