Washington (AFP) - Texas Senator Ted Cruz commanded new momentum Wednesday in the race for the White House with a solid Wisconsin primary win, making it harder for frontrunner Donald Trump to clinch the Republican nomination outright.

Upstart senator Bernie Sanders also beat frontrunner Hillary Clinton in the Midwestern state, bolstering his claim to be a viable alternative standard-bearer to the former secretary of state and first lady.

Sanders has now won six of the last seven Democratic nominating contests against Clinton.

But the Wisconsin results were almost certainly more damaging for Trump.

The billionaire stormed to the fore last year with a brash anti-establishment message.

But he has suffered setbacks in recent weeks with a string of controversial comments about abortion, NATO and nuclear weapons.

Cruz captured most of Wisconsin's 42 Republican delegates, making it far less likely that Trump will win the 1,237 delegates necessary to secure the nomination outright.

This raises the prospect of a contested convention in July when the delegates meet to choose the party nominee for the November presidential election.

- 'Turning point' -

"Tonight is a turning point. It is a rallying cry," Cruz told cheering supporters in Milwaukee after he received a hug from Wisconsin Governor Scott Walker, one of several former 2016 presidential candidates to have endorsed him.

"It is a call from the hard-working men and women of Wisconsin to the people of America. We have a choice, a real choice."

Trump made no public appearance after the results were announced.

His campaign released a statement that criticized Cruz as, among other things, "worse than a puppet — he is a Trojan horse, being used by the party bosses attempting to steal the nomination from Mr. Trump."

Cruz and the anti-Trump movement had eyed Wisconsin as a firewall against the real estate tycoon's march to become the GOP flag bearer.

Analysts said Tuesday's vote could alter the trajectory of the Republican race.

Story continues

"Trump needs every delegate to get to 1,237, and tonight was a significant setback," veteran election analyst Larry Sabato of the University of Virginia told AFP.

"It's not impossible for Trump to still get there, but the likelihood is that Trump will be a few dozen delegates short of a majority," he added, meaning the likelihood of a contested convention has increased substantially.

Tuesday's results cement Cruz's status as the leading anti-Trump candidate, with Ohio Governor John Kasich far behind.

Cruz used his victory speech to turn the spotlight on a possible face-off with Clinton.

"Hillary, get ready. Here we come," he said.

Cruz also predicted he could earn the 1,237 delegates needed to win the nomination.

That goal will be extremely difficult to reach: experts have projected Cruz would need to win 90 percent or more of remaining delegates to reach the magic number.

With 98 percent of votes counted, Cruz, a conservative senator from Texas, was ahead with 48.3 percent of the vote, compared to 35 percent for Trump. Kasich was a distant third at 14 percent.

On the Democratic side, Vermont Senator Sanders led with 56.4 percent to 43.3 percent over Clinton.

"This campaign is giving energy and enthusiasm to millions of Americans," Sanders told supporters in Wyoming, which holds a Democratic vote Saturday.

Sanders said his momentum gives him an "excellent chance" to win California, Oregon and other states.

"We have a path toward victory, a path toward the White House," he declared.

But Clinton, the onetime first lady who is aiming to become the nation's first female commander in chief, has the delegate math in her favor and can look forward to the upcoming races with some confidence.

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.

- Trump's sour grapes -

His campaign for months had appeared to be fireproof.

Yet the billionaire went into Tuesday's vote after a brutal week on the campaign trail. Analysts notably pointed to comments on abortion that damaged his standing with women voters.

After the Wisconsin vote, his team lashed out at Cruz, saying the senator had "the entire party apparatus behind him."

Trump had 740 delegates heading into Tuesday. Cruz had 474 and Kasich 145, according to CNN.

If none reaches the threshold of 1,237 before the Republican primary races wrap up on June 7, the nominee could be decided at a contested convention where, after the first ballot, delegates will be free to vote according to personal preference instead of being bound by the primary results.

Clinton secured 1,742 delegates prior to Tuesday -- including 483 so-called "super-delegates" who are not bound by primary results -- while Sanders has 1,051, according to a CNN tally.

A candidate needs 2,383 delegates to secure the Democratic nomination.