Republican presidential candidate Ted Cruz has decisively won the Wisconsin state primary, complicating front-runner Donald Trump’s path to the nomination.
In the Democratic race, US media have projected that Bernie Sanders will score a victory over Hillary Clinton in the Midwestern state.
Mr Trump leads the Republican race, but there are concerns that he could fall short of the number of delegates needed to secure the party’s nomination.
Mr Trump’s rivals have pinned their hopes on a contested convention.
At a contested convention, party leaders, not voters, would choose the nominee.
“Tonight is a turning point, it is a rallying cry to the people of America,” Mr Cruz told supporters in Milwaukee on Tuesday. “We are winning because we are uniting the Republican Party.”
Mr Cruz is unlikely to earn enough delegates to win the outright nomination, but Republican Party leaders have rallied around the Texas senator in hopes of wounding Mr Trump.
Analysis: Jon Sopel, BBC News North America Editor
Who knew it? Newton was right; there is such a thing as gravity after all.
I’m not much of a scientist, but I had, well, started to doubt him. I thought maybe he hadn’t got it right with the whole thing about the apple falling. After nine months of the most improbable act of levitation ever seen outside of a circus or a weightlessness laboratory, the blond sorcerer has come down to earth.
No, he didn’t reach terminal velocity. And as falls go, it wasn’t that serious. He’s got a few scrapes, and maybe that over-inflated ego has had some of the air knocked out. You could hear the hissing sound from miles away. But a fall it has been.
And that is remarkable and worthy of note. Because for nine months now it has seemed that Donald Trump could say and do whatever he liked without there being consequences.
But then he took on women. And so Wisconsin is lost. And Mr Trump has shown he is mortal.
Mr Trump said on Tuesday he would prevail despite the loss and took aim at his rival.
“Ted Cruz is worse than a puppet – he is a Trojan horse, being used by the party bosses attempting to steal the nomination,” the Trump campaign said in a statement.
Party leaders are concerned that Mr Trump would be a weak candidate in the general election and could harm other Republicans lawmakers on the ballot.
Polls show that the real estate tycoon is extremely unpopular among key voting blocs including women, Latinos and young people.
On the Democratic side, Wisconsin adds to a recent spate of wins by the Sanders campaign, giving the Vermont senator a boost before key races in New York and Pennsylvania.
Addressing supporters in Wyoming, Mr Sanders stressed momentum was on his side and that his outsider candidacy could change the status quo.
“Real change never takes place from the top down; it always takes place from the bottom up,” Mr Sanders told supporters.
Mrs Clinton still holds a sizeable lead and most analysts say she will eventually become the Democratic nominee despite her recent losses.
While Tuesday’s loss was a setback for Mr Trump, his campaign has time to rebound.
The campaign now moves to large north-eastern states, where polls show Mr Trump holds a significant lead.
Mr Trump’s loss in Wisconsin comes after a rocky week for the campaign, particularly with female voters.
The New York businessman repeatedly struggled to articulate his position on abortion. At one point, he called for women to be punished for having abortions, then quickly changed his mind.
More on the 2016 campaign
US election 2016: Wisconsin Primary – Complete results as votes are counted
For Bernie Sanders, it’s momentum versus math – The Sanders campaign is on a winning streak
Trump’s disastrous women voter problem – This voting bloc could doom in chances in the general election
His campaign manager Corey Lewandowski was also arrested, accused of manhandling a female journalist. Mr Trump has vehemently defended Mr Lewandowski and rebuffed calls to fire him.
Meanwhile, outside groups opposed to Mr Trump’s nomination stepped up their efforts in Wisconsin, running negative television adverts.
Popular state leaders such as Governor Scott Walker and influential talk radio programme hosts also opposed the Trump campaign and threw their support behind Mr Cruz.