Ted Cruz said he was abandoning  his presidential campaign on Tuesday, an exit that removes the most formidable foe to Donald Trump in his bid for the Republican nomination.

Cruz’s departure from the race came after a bruising primary loss to Trump on Tuesday.

His defeat made it all the more unlikely that he could deny Trump the necessary delegates to secure the nomination before the GOP convention in July.  Cruz told supporters there was no longer a viable path to victory.

“Tonight, I’m sorry to say it appears that path has been foreclosed,” Cruz told supporters.

It leaves Trump in the race with John Kasich, who has won just one state, Ohio, where he serves as governor. Kasich’s campaign issued a statement in which it said he would remain in the race until a candidate reached the 1,237 delegate threshold to clinch the nomination.

Reince Priebus, chairman of the Republican National Committee, wrote in a tweet, “@realDonaldTrump will be presumptive @GOP nominee, we all need to unite and focus on defeating @HillaryClinton.”

The timing of Cruz’s departure is somewhat of a surprise, as he had made a blistering attack on Trump earlier Tuesday after Trump had suggested that Cruz’s father, Rafael, hung out with Lee Harvey Oswald. The story was based on a National Enquirer report.

But Indiana was to be a firewall, after Trump’s sweep of northeastern states last week. Instead, Trump was poised to take all or almost all of the Hoosier State’s delegates.

Cruz faced a daunting challenge of waging a campaign in California, which holds its primary on June 7. It would have required a huge outlay on advertising and organizing.

“We are suspending our campaign, but hear me now, I am not suspending our fight for liberty,” Cruz said.

Cruz cited Ronald Reagan’s bid for the Republican nomination in 1976 which galvanized conservatives but fell short to incumbent President Gerald Ford. But Reagan swept into office four years later.