Ted Cruz has announced he is ending his campaign for the US Republican presidential nomination, after losing heavily to Donald Trump in the Indiana primary.
Trump, a New York businessman who is unpopular with many in his own party, is almost certain to be the nominee.
Earlier, Cruz called Trump a “liar” who was unfit to be president.
In the Democratic battle, Bernie Sanders is projected to beat Hillary Clinton in Indiana.
“Clinton campaign thinks this campaign is over. They’re wrong,” he said.
Cruz’s advisers had targeted Indiana as the Texas senator’s best hope of halting Trump’s march to the nomination, reports the BBC.
“We gave it everything we’ve got, but the voters chose another path,” he told supporters in Indiana.
His departure means Trump is the presumptive Republican nominee, sure to reach the 1,237 delegates required to win.
The New York businessman is the first nominee since Dwight Eisenhower in 1952 to lack any previous experience of elected office.
The verbal attacks between him and Trump had reached a new level of intensity on Tuesday.
Cruz attacked the billionaire businessman as “totally amoral”, “a pathological liar” and “a serial philanderer”.
Trump responded by calling Ted Cruz a “desperate candidate trying to save his failing campaign”.
But hours later, after Cruz announced he was quitting the race, Trump praised him as a “tough, smart competitor”.
It is looking increasingly likely that Trump will face Mrs Clinton in the autumn in the battle to succeed President Barack Obama, who will be leaving the White House after two terms.
But Republicans have expressed reservations about Trump’s outspoken remarks, which have offended women and Hispanics.
There are also concerns about some of his policies on immigration and national security, like building a wall on the southern US border paid for by Mexico, a ban on Muslims coming to the US and the killing of the families of terrorists.