US networks including Fox News and NBC called the race for the two underdogs within half an hour of polls closing in the Midwestern state that borders Canada.
Bernie Sanders wins Michigan Democratic primary: US networks
With seven percent of precincts reporting, Cruz, a conservative senator from Texas, was ahead with 49 percent of the vote compared to 35 percent for billionaire Trump.
Ohio Governor John Kasich was a distant third at 14 percent.
Cruz's win in the Badger State is a serious blow to Trump and could alter the trajectory of the Republican race.
The New York real estate mogul predicted a surprise win Tuesday in Wisconsin, but now faces a narrower path to victory and the 1,237 delegates needed to sew up the Republican nomination.
Tuesday also cements Cruz's status as the leading anti-Trump candidate, with Kasich far back in the nomination battle.
On the Democratic side, Vermont Senator Sanders led with 57 percent versus 43 percent for Clinton.
Clinton, Sanders audition for role as anti-Trump candidate
But the former secretary of state can look forward with some confidence to the upcoming races.
She leads Sanders by double digits in New York, her adopted home state which votes April 19, and Pennsylvania, which casts ballots a week later.
Trump also leads handily in his home state of New York and in Pennsylvania.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ