After losing Indiana on Tuesday to Donald Trump, Ted Cruz dropped out of the race to become the Republican presidential nominee, clearing a path for Trump to secure the nomination.

“We left it all on the field in Indiana,” Cruz told a group of supporters. “We gave it everything we've got but the voters chose another path. So with a heavy heart but with boundless optimism for the long-term future of our nation, we are suspending our campaign.”

With 98 percent of precincts reporting, Trump won 53.3 percent of the vote in Indiana, giving him all of the state's 51 delegates.

Earlier in the day, as voters headed to the polls, Cruz attacked Trump during a news conference, calling him a “pathological liar” unfit for the White House. Trump had previously referred to Cruz as “lying Ted.”

Cruz unloaded on Trump after he repeated a tabloid story that connected Cruz's father to the assassination of President John F. Kennedy.

“Donald Trump is a such a narcissist that [President] Barack Obama looks at him and says, 'Dude, what's your problem?'” Cruz told reporters.

“Whatever lie he's telling, in that minute he believes it.”

“If Indiana does not act, this country could plunge into the abyss,” he added.

With Cruz suspending his campaign, Ohio Governor John Kasich becomes Trump's lone rival for the GOP nomination, though he's won only one primary contest.