Republican Ted Cruz has stormed to a commanding victory in Wisconsin, denting frontrunner Donald Trump's chances of capturing the Republican nomination before the party's convention.
But Democrat Bernie Sanders still faces a mathematically difficult path to the White House despite defeating rival Hillary Clinton.
Trump's defeat capped one of the worst periods of his campaign, a brutal stretch that highlighted his weaknesses with women and raised questions about his policy depth.
While the billionaire businessman still leads the Republican field, Cruz and an array of anti-Trump forces hope Wisconsin signals the start of his decline.
"Tonight is a turning point," Cruz told cheering supporters at a victory rally.
"It is a call from the hardworking people of Wisconsin to America. We have a choice. A real choice."
Cruz, an ultraconservative Texas senator with a complicated relationship with Republican leaders, also cast his victory as a moment for unity in a party that has been roiled by a contentious primary campaign.
But Trump was unbowed.
"Ted Cruz is worse than a puppet - he is a Trojan horse, being used by the party bosses attempting to steal the nomination from Mr Trump," a biting statement from the Trump campaign said.
Sanders's sweeping win in virtually every county in Wisconsin, except Milwaukee, gives him greater incentive to keep competing against Clinton.
But he still trails her in the pledged delegate count and has so far been unable to persuade superdelegates- the party officials who can back any candidate - to drop their allegiance to the former secretary of state and back his campaign.
Sanders is favoured to win the Wyoming Democratic caucuses on the weekend.
The results in Wisconsin make it likely both parties' primaries will continue deep into the spring, draping front-runners Trump and Clinton in uncertainty and preventing both from fully setting their sights on the general election.
The focus of the campaign now turns to New York which holds its critical primary on April 19.
Sanders' latest victory will not cut significantly into Clinton's lead in the pledged delegate count.
With most of Wisconsin's delegates allotted, Clinton now has 1274 delegates to Sanders' 1025, based on primary and caucus results alone.
When including superdelegates, Clinton has a wider lead - 1743 to 1056. It takes 2383 delegates to win the nomination.
Trump leads the Republican race with 740 delegates to Cruz's 508, while Ohio Senator John Kasich had 143. It takes 1237 delegates to win the nomination.