The front-runners on both sides fell hard in Wisconsin's presidential primary Tuesday, injecting new intrigue, chaos and drama into an epic campaign.

For Republicans, Donald Trump's decisive loss to Ted Cruz elevates all the uncertainties and schisms that have dogged the party for months, and increases the odds of a history-making "open" convention.

For Democrats, Hillary Clinton's loss to Bernie Sanders leaves her daunting delegate lead largely intact, but gives Sanders a solid victory in a high-turnout Midwestern battleground and feeds doubts about Clinton's ability to appeal to independents and energize voters in her own party.

Cruz, who inherited a late surge of support from anti-Trump Republicans, captured 36 of Wisconsin's 42 GOP delegates, making it that much harder for Trump to win an outright delegate majority before the party's July convention in Cleveland. Trump won the other six.

"Tonight is a turning point; it is a rallying cry," said Cruz, speaking at American Serb Memorial Hall on Milwaukee's southwest side. "Wisconsin has lit a candle guiding the way forward."

One of the most conservative members of the U.S. Senate, Cruz dominated among the party's most conservative voters Tuesday. But he also broadened his reach, redefining himself as a go-to candidate for establishment Republicans, winning men and women, young and old, urban and suburban voters.

Cruz replicated the classic map of past GOP primary winners, piling up huge margins in the high-turnout, ultra-red counties that abut Milwaukee, while losing large, less populated swaths of northern and western Wisconsin to Trump. Ohio Gov. John Kasich was a distant third.

Strikingly, Cruz beat Trump among blue-collar whites, a group that accounted for roughly half the GOP vote here. Trump had carried "non-college" whites in the vast majority of primaries this year, winning them by large margins in neighboring Michigan and Illinois last month.

Wisconsin represents a sharp and significant break from that pattern.

New role for Wisconsin

In its 104th year, this year's edition of the Wisconsin primary was the most hotly contested, colorful and consequential in decades.

After years of backing party front-runners, this state gave life Tuesday to their closest rivals. Instead of all but ending the nominating process — Wisconsin's more traditional role — it has now prolonged it. Victories by Trump and Clinton would have all but sealed their nominations. But both were fighting on unfavorable ground here, and that opportunity was missed.

The question ahead for both parties is whether Wisconsin will be a turning point in a marathon nominating process or a "one-off," the by-product of the state's distinctive culture, politics, population mix and political rules.

The candidates now head to a very different political landscape — New York — where Clinton served as U.S. senator and Trump and Sanders grew up. Trump has enjoyed a big lead in the polls there. Clinton has also led, but Sanders has been gaining. The primary is April 19.

On Tuesday night, though, Cruz was able to proclaim that Wisconsin's vote sent a message to the country that, "We have a choice, a real choice." And Sanders celebrated his sixth win in the last seven contests.

"Momentum is when you look at national polls, when you look at statewide polls, we are defeating Donald Trump by very significant numbers," Sanders told a crowd in Laramie, Wyo., Tuesday night. "And in almost every instance — in national polls and in state polls — our margin over Trump is wider than is Secretary Clinton's."

Clinton offered her congratulations to Sanders on Twitter.

Sanders was headed to victory in all but a handful of Wisconsin counties. (The state's biggest county, Milwaukee, was a notable exception.) He won blue-collar voters. He won rural voters. He benefited from the state's open primary, which ensured a big independent vote. Independents made up more than a quarter of the Democratic vote, and Sanders won them by roughly 40 points, according to exit polls.

He ran even with Clinton among moderates, but was helped by the liberal tilt of the Democratic electorate. In 2008, when Clinton lost to Barack Obama here by 17 points, less than half the voters in that contest described themselves as liberal. This time, two-thirds of the voters in the Democratic primary were liberal, exit polls said, and a solid majority of them backed the Vermont senator.

There were big gender and age gaps in the race. Sanders won under-30 voters by roughly 5 to 1. Clinton won voters 65 and older by more than 20 points. Clinton dominated among African-American voters, but they made up only about one-tenth of the electorate in this overwhelmingly white state.

Sanders' victory in the popular vote is tempered by the delegate math. Democratic rules for allocating delegates in proportion to the popular vote ensured that with anything short of a massive Wisconsin victory, Sanders' delegate gains be limited. Out of 86 pledged delegates in play Tuesday, he appears to have won 48 to Clinton's 38 for a net gain of 10. But Clinton's lead among the state's 10 unbound "super-delegates" will reduce that number.

A stiff wall for Trump

Of the two contests, the uncertainties surrounding the Republican race appear much greater, thanks to Trump's unpredictability, the rifts within his party, and the mathematical chances of a contested convention.

The GOP awards its delegates using a winner-take-all system, and those rules helped Trump's opponents. Cruz won all of the state's 18 "statewide" delegates, and was slated to win three delegates for each of the six congressional districts he won. Trump won the other two districts: the Seventh in northern Wisconsin and the Third in western Wisconsin.

Trump met a stiff wall of resistance when he arrived in Wisconsin last week — from Republican politicians, conservative activists and conservative media. "Stop Trump" groups saw favorable turf and spent heavily. Gov. Scott Walker endorsed Cruz, and Trump fanned the fire with a series of controversial statements.

In a statement, his campaign said that Trump "withstood the onslaught of the establishment," including the governor of Wisconsin, "conservative talk radio hosts and the entire party apparatus." It called Cruz a "Trojan Horse" for party bosses out to steal the nomination from Trump.

But Trump's problems here ran much deeper than the upheaval of recent weeks. His polling numbers were chronically weak. Surveys dating back to last fall showed a massive regional divide within the state. Trump enjoyed a positive image in northern Wisconsin but was hugely unpopular in the reddest counties in metro Milwaukee, with their higher levels of income and education.

In exit polling, 38% of GOP voters said they'd be "scared" by a Trump presidency; another 20% said they'd be concerned.

Those polls also suggest that Trump's signature issues of trade and immigration were of limited help in Wisconsin. GOP voters were far more likely to cite government spending, the economy and terrorism as top issues (only 5% said immigration).

For much of this GOP race, analysts have been predicting that Trump, because of his high negatives and hard "ceiling" of support, would be overtaken once the GOP field narrowed and his rivals stopped dividing the rest of the vote.

That may have finally happened in Wisconsin, where Trump couldn't break out of the 30s in his share of the GOP vote, and Cruz shot past him with a huge assist from a Trump-resistant state.