Texas Senator Ted Cruz told his supporters in Milwaukee that the win marked "a turning point" in the campaign
Texas Senator Ted Cruz has won the Wisconsin Republican primary, further hampering front runner Donald Trump's bid for the nomination.
On the Democratic side, Vermont Senator Bernie Sanders defeated Hillary Clinton to take his sixth victory out of the last seven contests.
Both Mr Sanders and Mr Cruz still have ground to make up to overtake their rivals in the delegate counts before the party conventions in late July.
The win guarantees Mr Cruz at least 18 delegates. Another 24 will be handed out based on final results from Wisconsin's eight voting districts.
Some 86 delegates were in play for the Democrats, but even with Mr Sanders projected to take the majority he still trails Mrs Clinton by more than 600, including the party's superdelegates.
On the Republican side, Mr Cruz headed into Tuesday's contest with 475 delegates to Mr Trump's 737.
Mr Cruz called his victory in the Badger State a "turning point" in the election.
The ultraconservative senator has welcomed a boost in support from more moderate Republicans hoping to stop Mr Trump from reaching the 1,237 delegates needed to secure the GOP nomination.
"We've got the full spectrum of the Republican party coming together and uniting behind this campaign," Mr Cruz told supporters at a victory rally in Milwaukee.
His win in the Midwestern battleground state raised the prospect of a contested convention in July, which would occur if no candidate reaches the 1,237 mark.
Fellow Republican hopeful John Kasich appears to have his sights set on such an outcome.
After finishing a distant third on Tuesday, the Ohio governor, who has just 143 delegates, sought to validate his campaign by tweeting polling data that projected him as the only GOP candidate who could defeat Mrs Clinton.
Mr Trump, meanwhile, will look to the New York primary in two weeks to help put his campaign back on track.
The billionaire businessman holds a generous lead in opinion polls in his home state.
Mr Trump has been on the defensive after self-inflicted wounds such as his attacks on Mr Cruz's wife, an abortion gaffe and his campaign manager allegedly roughing up a reporter.