MADISON, Wis. — If there is a symbol of the Wisconsin Democratic comeback following the shock of President Trump’s 2016 victory and nearly a decade of being beaten into submission by the Republican state legislature, it is Jill Karofsky.
Ms. Karofsky stunned most of Wisconsin, and herself, when in April she won an 11-point victory in a race for a State Supreme Court seat, during an election the state’s Republicans blocked its Democratic governor from delaying because of the coronavirus pandemic.
“I did not see a path for us to win,” Justice Karofsky said during a six-mile run on Monday. But when the polls opened April 7, she said, “I went for a run and I came home and I looked at my phone and I saw all those brave people voting in Milwaukee. And that’s when I started to have a glimmer of hope.”
For Wisconsin Democrats, hope has been something in short supply since 2010, when Republicans won control of the state’s government and began to systematically dismantle a progressive political infrastructure built up over generations.
While Justice Karofsky’s race was officially nonpartisan, her allies made the battle lines clear — the contest was a referendum on Mr. Trump and Republican governance in the state. And her victory, with its surprise margin, provided an important psychological boost to a party beaten down by the state’s dominant Republicans and still spooked by 2016, when Hillary Clinton, who never visited the state, lost Wisconsin by just 22,748 votes — a margin seared into the memory of the state’s top Democrats.
Only in the final hours of the 2020 campaign, when more than half the state’s voters had cast pre-Election Day ballots, did Wisconsin Democrats allow themselves to say out loud that they believed former Vice President Joseph R. Biden Jr. would carry the state by a healthy margin when counting was expected to be completed on Wednesday.
It is a bullishness borne of the combination of high turnout in Madison and Milwaukee, signs they had won back some rural Democrats who voted for Mr. Trump in 2016, and the feeling that, since 2016, they have finally won more than they’ve lost. Democrats also believe that a recent statewide surge in coronavirus cases has helped refocus voters on the president’s handling of the pandemic.
After Mrs. Clinton’s loss in Wisconsin, Democrats here began organizing from the ground up. The Democratic National Committee and other liberal organizations began in 2017 to make investments in the state that the party neglected during the Obama years. In 2019, the Democratic Party of Wisconsin elected as its chairman Ben Wikler, a veteran Moveon.org organizer who in the last 18 months has raised record sums for the party, bringing in more than twice the funds as his Republican counterparts.
All this took place in the ashes of the devastating 2016 contest, when Democrats were certain of a victory, but disinclined to do much to make one happen.
During that campaign, Mandela Barnes, who would be elected lieutenant governor two years later, asked people to pose with him in photographs for Mrs. Clinton’s Instagram page. “People were like, ‘Ehhh, I don’t really know about that.’” Mr. Barnes said. “I was like, ‘We’re friends!’ But also, damn.”
But despite the new optimism, after so many searing defeats, there is a sense among voters that nothing is to be taken for granted.
“For the past 10 years it’s been like living with a boot on our necks,” said Andy Olsen, a policy advocate for an environmental organization who spent Tuesday morning reminding voters at Madison’s Monona Terrace to text three friends to remind them to vote, too. “We kept getting knocked down and trying to get back up again. People are cautious about getting their hopes up too much.”
Even before the April court election, there were already signs that the state’s fragile Trump coalition was crumbling. Republican margins in the Milwaukee suburbs dropped precipitously during the 2018 midterm elections, while Democrats clawed back some of the voters Mr. Trump won in 2016, especially in the Fox Valley, a key battleground region of the state.
Without Mrs. Clinton as a foil, many of these voters began to judge Mr. Trump on his own and didn’t like the results.
“I voted for Trump four years ago out of default,” said Ted Schartner, a plasterer from Green Bay who voted for Mr. Biden last Wednesday. “I regretted it almost right away. I didn’t like the way things were heading.”
While voters were coming to terms with a Trump presidency, Wisconsin Democrats found themselves digging out of their collective nadir. Not only was it the first time since 1984 that a Republican had carried the state’s electoral votes, but Democrats were locked out of state government, gerrymandered into a deep minority in the state legislature and facing a State Supreme Court controlled by conservative justices.
By the time Mr. Trump won the White House, Wisconsinites had already gotten used to the constant partisan warfare that would define his administration.
“You go to a gathering of friends and it turns into politics right away,” said Roben Haggart, who has served as Minocqua’s town clerk for 22 years. “It always turns into an argument.”
Mr. Trump’s victory here led to talk that Wisconsin, with its large population of white working-class voters, had become a fixture of the Republican Electoral College map, out of reach for Democratic candidates.
The state’s Democratic infrastructure was in shambles, but little by little voters began to turn against Mr. Trump. In January 2018, a Democrat won a special election to a rural State Senate district Mr. Trump had carried by 17 points. That fall, Democrats rode anger against Mr. Trump to a sweep of the statewide elections, ousting Scott Walker, a two-term governor who had crippled the state’s public-sector labor unions.
In June 2019, Wisconsin Democrats elected as their state chairman Mr. Wikler, who had moved his family into his childhood home in Madison. Mr. Wikler brought an organizing and fund-raising heft the state had never seen. The Democratic Party of Wisconsin has raised $58.7 million in the last two years, more than twice the haul for the state’s Republicans.
“Trump’s win, in a lot of ways, accelerated and pushed forward necessary change within our party,” said Alex Lasry, a senior official for Milwaukee’s pro basketball franchise who is weighing a run for the seat of Ron Johnson, a Republican senator, in 2022. “Democrats realized we can’t just sit on the sidelines in these off-year elections.”
Representative Mark Pocan, a Madison Democrat, said Mr. Biden’s campaign and Mr. Wikler’s leadership created a dramatically different political landscape than four years ago.
“The Biden campaign is 180 degrees different than what we had four years ago,” Mr. Pocan said. One important difference: Mr. Biden has visited Wisconsin three times since the primary. “The candidate never came post-primary four years ago, we had no resources specifically for Wisconsin — or very little resources.”
The 2016 contest was marked by a drop in turnout among Black voters in Milwaukee, who are now a key part of Mr. Biden’s hopes for a Wisconsin victory.
The Rev. Greg Lewis, the executive director of the Milwaukee Souls to the Polls effort, said the Black electorate in the city had changed, thanks in part to Mr. Trump’s presidency. Since 2012, Mr. Lewis said, the money that was absent in 2016 is now flowing to community leaders for get-out-the-vote efforts, just as Black Milwaukeeans have become more engaged in removing Mr. Trump.
“These groups weren’t active four years ago, because we didn’t have funding or resources to do any of the things we’re doing right now,” Mr. Lewis said. “I just think the Democratic Party didn’t come into the community enough to energize and make sure that people were willing to do what needs to be done.”
By October, Wisconsin’s coronavirus spike was among the worst in the country — and by far the worst of any presidential battleground state. The president’s approval rating on the pandemic in Wisconsin had fallen from 51 percent in March to just 40 percent, according to a Marquette Law School poll.
“We’ve got people that are supposed to be leading the country that have just thrown up their hands and said, there’s nothing we can do about this pandemic — which is just demonstrably not true,” said Kate Walton, an emergency room nurse in Madison who said she voted for Mr. Biden.
One after another, Biden voters across the state in the last week said their votes were motivated primarily by a desire to oust Mr. Trump.
“I wouldn’t vote for Trump for nothing, even if you paid me all the money he says he’s worth,” said Terri Konkol, a 58-year-old Milwaukeean who on Saturday voted for Mr. Biden from her wheelchair. She blamed the president for the virus’s spread in the state. “In our whole lifetimes have we ever had to wear masks?”
Rose Goeb, 62, a Milwaukee preschool teacher, voted early for Mr. Biden on one of the first days she could.
Of Mr. Trump, she said, “I made up my mind a long time ago that this man does not have the character or discipline to be president.”
And on Tuesday in Madison, among a line of voters waiting to cast ballots when the polls opened at 7 a.m. was Helen Hawley, an artist who was inspired by Senator Bernie Sanders and a fierce desire to remove Mr. Trump.
“It’s hard to be hopeful about anything right now,” said Ms. Hawley, 40. “But it’s better to have hope than to not. Hope is just something I hold onto because it’s a good idea.”
Reid J. Epstein reported from Madison, Wis., and Astead W. Herndon from Milwaukee.