We beat the NRA!” Judge Rebecca Dallet announced as she claimed her pattern-breaking win in a contentious race for a position on the Wisconsin Supreme Court.

Dallet trounced conservative Judge Michael Screnock, securing 56 percent of the vote statewide to become the first liberal contender elected to an open seat on the high court since 1995. Dallet will replace one of its most right-wing members, retiring Justice Michael Gableman.

The outcome of the first such high-profile statewide contest of 2018 signaled that the influence of the National Rifle Association is far less of a defining force in swing states such as Wisconsin than was once imagined.

Conservatives built their dominance in Wisconsin judicial races over the past several decades by pulling together classic right-wing coalitions. Although these contests are decided on a nonpartisan ballot, Wisconsin Governor Scott Walker and his fellow partisans relied on the infrastructure of the Republican Party and its allies—such as the NRA, anti-choice groups, and corporate interests—to generate enthusiasm in traditionally low-turnout spring elections.

Screnock, who had long been involved with right-wing causes, earned an enthusiastic endorsement from the the NRA’s political operation before the Supreme Court primary election in February. In fact, on the day before a gunman murdered 17 students, teachers, and coaches at Marjory Stoneman Douglas High School in Parkland, Florida, Chris W. Cox, the national chairman of the the National Rifle Association Political Victory Fund, identified Screnock’s campaign as a priority for the group and said, “It’s important that all pro-Second Amendment voters get to the polls on Feb. 20 and elect Judge Michael Screnock to the state Supreme Court.”

Screnock finished first in the primary, which set up Tuesday’s contest with Dallet.

While mailings from the gun group identified Screnock as “the candidate who has committed” to the NRA’s agenda, Dallet bet that Wisconsinites were ready for a sensible response to gun violence—and to the special-interest groups that thwart necessary action. “It’s lawful to keep weapons of mass destruction out of the hands of dangerous criminals and those who shouldn’t have them,” she argued. “I value human lives over money. My opponent cannot say the same.”

Running in a state with a hunting heritage and high levels of gun ownership, Dallet explained: “In Wisconsin, the vast majority of gun owners are responsible people. Hunting will remain one of our state’s favorite pastimes. In my court, I’ll always defend our rights and the rule of law. Common-sense gun restrictions are clearly constitutional.” And she went a step further, highlighting the fact that her opponent was backed by the NRA and that she was not.

“Just hours before a 19-year-old boy took an AR-15 and murdered 17 of his former classmates, the #NRA endorsed my opponent for Wisconsin Supreme Court. Their last tweet before the #ParklandShooting was announcing their support for @JudgeScrenock,” noted Dallet, the mother of three teenage daughters.

Dismissing Screnock as “an extreme activist who has pledged to stand with the #NRA over the people,” Dallet tweeted after the primary: “That’s why I took the #NoNRAMoney pledge. I will not accept money from an organization that puts profits above the lives of Americans. Will you join me today in pledging that we won’t vote for any candidate who takes NRA money?”

She got responses like: “Give ’em Hell Judge Dallett!” And she never looked back.

The Wisconsin race was about more than guns. Dallet took on Trump and Trumpism, even airing a television ad that featured images of the president and a narrator saying: “He’s attacked our civil rights and our value. She’ll protect them.” When women marched to protest Trump and his policies, Dallet marched with them. “I wake up every day with gratefulness and joy for my family, and dread for my country. What nonsense will President Trump tweet today, and what group of Americans will he attack?” she said. “And I think most of us are disgusted at the lowering of our standards. Most of us agree that the distasteful attacks on women, immigrants, and the vulnerable need to stop.”

Dallet also distanced herself from Walker and the big-money politics he has brought to Wisconsin. While Screnock rejected a proposal to strengthen rules that require judges to recuse themselves from cases involving their major campaign donors and supporters, the Milwaukee Journal Sentinel explained: “Dallet was very critical of the Supreme Court’s refusal to adopt a rule about when justices should recuse themselves from cases, and particularly of its vote to shut down the John Doe II investigation of Gov. Scott Walker’s campaign.”

As Walker campaigned for Screnock, Dallet made her support for an independent judiciary central to her campaigning.

Several national Democrats endorsed Dallet, including Vice President Joe Biden and former attorney general Eric Holder. But when Holder came to the state, Dallet chose not to appear with him and reemphasized her commitment to drawing firm lines on ethics issues, telling reporters: “Certainly if millions of dollars were spent on my campaign by a party in a case that was sitting in front of me…then I would recuse myself. And I think that distinguishes me from Judge Screnock, who refuses to make those assurances.”

In a measure of how desperate Screnock supporters became as the race progressed, the conservative’s backers claimed that because Dallet had publicly refused money from the NRA, she had shown more bias on gun issues than Screnock, who had accepted NRA support but had “not stated his personal views on firearms.”

The argument was laughable, as were many of the last-minute efforts by Walker’s political team and corporate special-interest groups to smear Dallet. By speaking in smart, nuanced ways about gun issues, while at the same time refusing to bend to the NRA, Dallet framed an approach that was in tune with voters—in Wisconsin and, potentially, other states across the country where the NRA has historically bullied candidates of both parties.

On Election Day, she ran well in urban areas. But Dallet also won a number of rural counties in western and northern Wisconsin—many of which backed Donald Trump in 2016—where at least some pundits had presumed that the NRA endorsement of her opponent would sway the result in the other direction.

The calculus had changed. So it was that, before a cheering crowd on election night, the judge who will soon be Justice Rebecca Dallet declared: “Tonight we proved that when the people rise up and stand together, we can beat the special interests. We beat the NRA, and we beat the millions of dollars that were spent on this race—flooding into our state.”