Donald Trump has won the Indiana Republican presidential primary, crushing the hopes of GOP foes who waged a frantic campaign to halt his march to the party’s nomination.

Texas Sen. Ted Cruz, Trump’s chief rival, suspended his presidential campaign hours after Trump was declared the winner, telling supporters “we left it all on the field in Indiana.”

“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,” he said.

The win and Cruz’s exit sets Trump on a likely path to secure the 1,237 delegates necessary to secure his party’s nomination before the convention in Cleveland this summer. Trump is poised to easily clear the decisive threshold that Cruz and Ohio Gov. John Kasich pledged to block from his reach.

In a memo earlier Tuesday, Kasich’s campaign manager said that the Ohio governor would fight on in the 2016 race. But he lags even farther behind Cruz in the delegate count and is mathematically eliminated from capturing a majority of delegates.

The Indiana contest between the Democrats remains too close to call.

But frontrunner Hillary Clinton leads rival Bernie Sanders by a significant number of total votes and delegates nationwide, and the results of Indiana’s primary are not expected to change her path to the Democratic nomination. Sanders has pledged to compete until the final primary contests in June.

Trump’s victory in Indiana was particularly stinging for Cruz, who employed a series of unorthodox campaign tactics in a last-minute effort to derail Trump’s chances in the Midwestern state.

Together, pro-Cruz and anti-Trump forces spent more than $6 million on television advertising in the Hoosier State in the effort to stall Trump’s march towards the Republican nomination. Cruz and Kasich announced an alliance last month to maximize opposition to Trump in remaining primary states, a strategy which backfired badly among Republican voters skeptical of a plan that Trump branded as “collusion.”

In an unusual move, Cruz announced that former HP chief Carly Fiorina would be his running mate if he captures the GOP nod — despite being mathematically eliminated from getting a majority of Republican delegates at all.

And in a fiery press conference Tuesday, a visibly upset Cruz derided Trump as “a pathological liar,” a “narcissist” and a “serial philanderer” whose electoral success to date has led the country “staring at the abyss.”

“Donald Trump laughs at the people of this state, laughs, bullies, attacks, insults,” he said in remarks responding to Trump’s unsubstantiated theory that Cruz’s father was involved in the assassination of John F. Kennedy. “I don’t believe that’s America.”

Trump took a less-than-conciliatory tone when he responded to Cruz’s charges on Twitter Tuesday evening, calling his rival “wacko.”