Bernie Sanders defeated Hillary Clinton in Wisconsin’s Democratic presidential primary Tuesday, in a reminder that the independent senator from Vermont has continued to win states, even as Clinton maintains her lead among delegates.

Sanders had 56 percent of the vote Wednesday compared with Clinton's 43 percent, with all precincts reporting.

The AP reported that Sanders will emerge from his win with at least 47 of Wisconsin's 86 delegates, while Clinton will gain at least 36. Sanders must win 68 percent of the remaining delegates and uncommitted superdelegates to win the Democratic nomination.

Clinton’s campaign had tried to lower expectations for her performance in Wisconsin. Her campaign manager, Robby Mook, wrote in a Tuesday fundraising email that she “could very well lose,” and Brian Fallon, her national press secretary, told MSNBC’s Andrea Mitchell that the state “somewhat favors” Sanders because its Democratic electorate is “very progressive” and the state hosts an open primary in which voters who aren’t registered as Democrats can participate.

Sanders, in contrast, had led in most Wisconsin polls since February and had telegraphed more confidence about his odds.

“If there is a large voter turnout, we will win on Tuesday,” Sanders said at a rally in Eau Claire Saturday.

Sanders significantly outspent Clinton on television advertisements in Wisconsin, and he had visited the state repeatedly in the two weeks before the primary in an attempt to not just win, but win big, holding town halls and rallies that cumulatively drew over 38,000 supporters in Madison, Appleton, Kenosha, Milwaukee, Onalaska, Sheboygan, Green Bay, Eau Claire, Wausau and Janesville.

Clinton had also visited Wisconsin, but held fewer events, stopping in Madison, Milwaukee, La Crosse, Green Bay and Eau Claire. (Her daughter Chelsea Clinton and former President Bill Clinton also held multiple organizing events in the state.)

Sanders had highlighted his opposition to free trade agreements, tying those deals to job losses in Wisconsin. He also emphasized his belief that the nation’s campaign finance and criminal justice systems need to be reformed and touted his tuition-free college and Medicare-for-all plans. Sanders’ win reflected how enthusiastic his base of support in Wisconsin has been: He got attention in early July when a rally of his in Madison drew 10,000, which at the time was the largest event for any of the presidential candidates in the race.

Sanders’ campaign frequently attempted to raise the stakes for the primary, noting in press releases that every winner of Wisconsin’s Democratic contest since 1960 has become the party’s nominee, with just one exception.

While Sanders has now outraised Clinton in each of the last three months and won seven of the last eight contests between the two candidates, Clinton’s delegate cushion has proven difficult to cut into. This disparity is a result of the types of states each is winning: Clinton swept every state in the South and has won more delegate-heavy states like Texas, Florida and Ohio, while the majority of Sanders’ wins have come in caucus states that carry fewer delegates.

Clinton or Sanders need to secure at least 2,383 pledged delegates to have a majority at the convention. Clinton currently has a lead of between 240 to 260 delegates, which widens if one counts superdelegates, or the party and elected officials who also play a role at the convention. Sanders’ campaign has suggested that neither candidate will go to the convention with a pledged delegate majority and that the senator will emerge as the victor there by persuading superdelegates to switch their allegiances.

As Politico noted, one problem for Sanders is that he doesn't perform well in closed primaries, and 16 of the states remaining in the contest between him and Clinton are closed -- just two are open with no restrictions on who can vote in the Democratic contest.

Some of the delegate-rich states he’d need win to stay close to Clinton with pledged delegates hold closed primaries, including New York, Pennsylvania, Maryland and New Jersey. Sanders' wins have come in caucuses and in three primaries where independents aren’t barred from participating.

The race now turns to New York, which hosts its primary on April 19. The state is a major contest because it sends 291 delegates to the convention. But before that, Sanders is expected to win Wyoming’s April 9 caucus.