In a stunning primary election development GOP presidential contender Ted Cruz shut down his campaign following a resounding defeat in Indiana. The move all but assures that rival Donald Trump will become the Republican contender in the general election for US president.

Cruz made the announcement that he was dropping out in Indianapolis after a crushing loss to Trump. Cruz has long been the underdog but there were some expectation that he could still become the GOP presidential candidate in a contested convention.

"I've said that I would continue on as long as there is a viable path to victory. Tonight, I'm sorry to say it appears that path has been foreclosed," Cruz said as he announced his decision to cries from the audience of "No!"

He added: "We gave it everything we've got. But the voters chose another path. And so with a heavy heart — but with boundless optimism, for the long-term future of our nation — we are suspending our campaign."

By the end of the night with nearly 96% of the tally counted, Trump had 53.2% of the vote to Cruz's 36.7%.

The announcement followed a contentious, fraught day between the rivals, with Trump appearing to link Cruz's father to John F. Kennedy's killing by accusing him of being in a photo with assassin Lee Harvey Oswald months earlier — based on a story from the supermarket tabloid the National Enquirer — and a furious Ted Cruz calling Trump a "pathological liar" and "utterly amoral."

The only possible — and weak — obstacle in Trump's path to becoming the Republican Party candidate for president now is John Kasich. The Ohio governor has no hope of catching up with Trump in the race for GOP delegates — but could possibly have a very slim chance in a contested convention, reports the Washington Post.

But Kasich remains in fourth place in the delegate count, trailing even long-gone Florida Senator Marco Rubio. Cruz's withdrawal makes it almost certain that Trump will win the 1,237 delegates he needs to lock up the nomination, and avoid a contested convention.