(CNN) Ted Cruz bowed out of the Republican presidential race Tuesday following a crushing loss to Donald Trump in Indiana, clearing the path for the real estate mogul to clinch the GOP nomination.

It was a remarkable turn of events in a presidential primary race that seemed destined -- just weeks ago -- to end in a contested convention this summer. Even in the final hours of the race in the Hoosier State, Cruz insisted he was staying in the race until June 7 -- going so far as to attack his rival during a news conference as a "pathological liar" unfit for the White House.

In the end, the growing strength of Trump's candidacy and Cruz's own stumbles in the past two weeks were too much for Cruz to overcome. The Cruz, Kasich and anti-Trump forces had concocted elaborate plans to try to deprive Trump of the 1,237 delegates he needs to win the nomination outright. But those plans hinged on money and momentum. After Tuesday night, it appeared that Cruz would have neither.

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

Cruz, a tea party favorite, had hoped to cobble together a winning coalition by consolidating the evangelical and libertarian wings of the Republican Party while also racking up commanding wins in the South. He was ultimately unable to achieve any of those things. Exit polls on Tuesday night showed that Indiana's evangelical voters split their votes evenly between Trump and Cruz. The Texas senator had the edge among late deciders, who made up a quarter of voters, but it wasn't enough.

He signaled that he was nearing the end Tuesday during an appearance on Dana Loesch's radio show, stating that his campaign had "left it all on the field."

"We are competing to the end as long as we have a viable path to victory," he said. "We are competing hard in this state and I am hopeful and optimistic. But at this point, it's in the hands of voters."

Cruz's final weeks as a presidential candidate were dominated by awkward moments. He forged an alliance with Ohio Gov. John Kasich that quickly crumbled. He named Carly Fiorina as his running mate, an unusual move for someone who is far from winning the nomination. Indiana Gov. Mike Pence endorsed him -- while also offering kind words for Trump.

He was also ridiculed for referring to a basketball hoop as a "ring" and for seemingly failing to notice when Fiorina fell off a stage in front of him.

Still, Cruz outlasted more than a dozen Republican rivals demolished by Trump by adopting an early strategy of playing nice. The Texas Senator had cultivated his image as the ultimate outsider in Washington. He attempted to channel the same frustration against Washington that Trump so successfully harnessed as he avoided becoming one of Trump's chief targets.

But Cruz's strategy was predicated on the notion that Trump's candidacy would ultimately implode -- as a result of remarks that went too far or actions that American voters deemed unpresidential.

That never happened.

Supporters of Cruz questioned whether he had waited too long to take on the real estate magnate, as he did in no uncertain terms during his news conference on Tuesday.

In one memorable tweet in mid-December, Cruz noted that "the Establishment" was hoping for "a cage match" between him and Trump. "Sorry to disappoint," he tweeted, "@realDonaldTrump is terrific."

When he appeared to inch ahead of Trump in December, Trump turned his fire on Cruz, who was caught flat-footed. He pulled off a win in Iowa, but ultimately lost many of the southern states that were supposed to be his firewall.

When he entered the Senate three years ago, Cruz clearly had presidential ambitions. But few expected him to rise as quickly as he did -- particularly as he earned the animosity of party leaders with his uncompromising stances and spotlight-seeking actions.

Photos: Moments from Ted Cruz's career U.S. Sen. Ted Cruz, a Republican presidential candidate, speaks during a campaign rally at the Indiana State Fairgrounds on Monday, May 2. Hide Caption 1 of 24 Photos: Moments from Ted Cruz's career Cruz holds up the hand of Carly Fiorina at a campaign rally in Indianapolis on Wednesday, April 27. Cruz named Fiorina, a former presidential candidate, as his running mate. Hide Caption 2 of 24 Photos: Moments from Ted Cruz's career Cruz celebrates his Wisconsin primary win with his wife, Heidi, and Gov. Scott Walker in Milwaukee on Tuesday, April 5. Walker endorsed Cruz for the presidency. Hide Caption 3 of 24 Photos: Moments from Ted Cruz's career With his wife by his side, Cruz tours the Dane Manufacturing facility before speaking to workers in Dane, Wisconsin, on Thursday, March 24. Hide Caption 4 of 24 Photos: Moments from Ted Cruz's career Cruz speaks during the CNN Republican debate in Miami on Thursday, March 10. Hide Caption 5 of 24 Photos: Moments from Ted Cruz's career Cruz and his wife wave to the crowd at Liberty University after he announced his presidential candidacy in Lynchburg, Virginia, on March 23, 2015. Hide Caption 6 of 24 Photos: Moments from Ted Cruz's career Cruz speaks during the 2013 NRA Annual Meeting and Exhibits at the George R. Brown Convention Center on May 3, 2013, in Houston, Texas. Hide Caption 7 of 24 Photos: Moments from Ted Cruz's career Cruz poses with his wife, Heidi, and his daughters Caroline and Catherine. Hide Caption 8 of 24 Photos: Moments from Ted Cruz's career Cruz (left) fields questions from Bruce Rastetter at the Iowa Ag Summit on March 7, 2015, in Des Moines, Iowa. The event allows the invited speakers, many of whom are potential 2016 Republican presidential hopefuls, to outline their views on agricultural issue. Hide Caption 9 of 24 Photos: Moments from Ted Cruz's career Nobel Peace Laureate Elie Wiesel (left) listens as Cruz (right) speaks during a roundtable discussion on Capitol Hill March 2, 2015 in Washington, D.C. Wiesel, Cruz and Rabbi Scmuley Boteach (center) participated in a discussion entitled 'The Meaning of Never Again: Guarding Against a Nuclear Iran.' Hide Caption 10 of 24 Photos: Moments from Ted Cruz's career Governor Greg Abbott (center) speaks alongside Cruz (left), Attorney General Ken Paxton (right) at a joint press conference February 18, 2015, in Austin, Texas. Hide Caption 11 of 24 Photos: Moments from Ted Cruz's career Sen. Patrick Leahy (right) escorts Loretta Lynch back from a lunch break as Cruz (left) sits nearby during her confirmation hearing before the Senate Judiciary Committee January 28, 2015, on Capitol Hill. Hide Caption 12 of 24 Photos: Moments from Ted Cruz's career Cruz greets supporters at the South Carolina Tea Party Coalition convention on January 18, 2015, in Myrtle Beach, South Carolina. A variety of conservative presidential hopefuls spoke at the gathering on the second day of a three-day event. Hide Caption 13 of 24 Photos: Moments from Ted Cruz's career Cruz (left) and then-Texas Governor Rick Perry stand together during a press conference at the front gate of Fort Hood about Iraq war veteran, Ivan Lopez, who killed three and wounded 16 before taking his own life on April 4, 2014, in Fort Hood, Texas. Hide Caption 14 of 24 Photos: Moments from Ted Cruz's career (Left to right) Sen. Lindsey Graham, Sen. John McCain and Cruz listen as President Barack Obama delivers the State of the Union address on January 28, 2014, in Washington, D.C. Hide Caption 15 of 24 Photos: Moments from Ted Cruz's career Then-Senate Minority Leader Mitch McConnell (second right), poses with Republican senators-elect Jeff Flake (left), Deb Fischer (second left), and Cruz (right) at the U.S. Capitol on November 13, 2012, in Washington, D.C. Hide Caption 16 of 24 Photos: Moments from Ted Cruz's career Cruz speaks to reporters on September 25, 2013, after ending his talk-a-thon on the floor of the US Senate in Washington, D.C. Hide Caption 17 of 24 Photos: Moments from Ted Cruz's career Cruz speaks as then-Rep. Michele Bachmann (left), Sen. Mike Lee (second right) and Sen. Rand Paul (right) listen during a news conference May 16, 2013, on Capitol Hill. Hide Caption 18 of 24 Photos: Moments from Ted Cruz's career Cruz listens to testimony during a Senate Judiciary Committee hearing on April 22, 2013, in Washington, D.C. Hide Caption 19 of 24 Photos: Moments from Ted Cruz's career Cruz holds a news conference to announce the plan to defund Obamacare on March 13, 2013. Hide Caption 20 of 24 Photos: Moments from Ted Cruz's career Cruz speaks at the CPAC on March 6, 2014, in National Harbor, Maryland. Hide Caption 21 of 24 Photos: Moments from Ted Cruz's career Then-Senate Republican Candidate and Texas Solicitor General Cruz speaks at the 'Patriots for Romney-Ryan Reception' on August 29, 2012, in Tampa, Florida. Hide Caption 22 of 24 Photos: Moments from Ted Cruz's career Then-Senate Republican Candidate and Texas Solicitor General Cruz speaks during the Republican National Convention at the Tampa Bay Times Forum on August 28, 2012. Hide Caption 23 of 24 Photos: Moments from Ted Cruz's career Then-Senate Republican Candidate and Texas Solicitor General Cruz speaks during the Republican National Convention in 2012. Hide Caption 24 of 24

He began the Republican race by forgoing the usual exploratory committee and instead launching a bid for the White House with little preamble but much fanfare as he stood before thousands of students at Liberty University.

The framing for his candidacy was surprising: Cruz had built his political profile around the government shutdown, not his faith. But the speech signaled a strategy that Cruz pursued over the better part of a year — an effort to become the grass-roots candidate who brings together both evangelical voters and the angry, economically anxious base that had powered Republicans to historic wins in the 2014 midterms.

A cluster of super PACs announced that they had $37 million in commitments to help Cruz, raising the prospect that he could compete with the likes of Jeb Bush, whose super PAC raised more than $100 million last year.

Cruz's strong organization and deep resources were one of the surprising story lines early in the Republican race. Even if he wasn't winning much in the way of public support at that point, his critics conceded that he might have the means to compete late into the presidential cycle.

But like everyone else on the GOP side, Cruz ran into Trump.

.@realDonaldTrump will be presumtive @GOP nominee, we all need to unite and focus on defeating @HillaryClinton #NeverClinton — Reince Priebus (@Reince) May 4, 2016

When Trump began making a series of controversial statements in summer 2015, Cruz was one of the only rivals who refused to rebuke the ascendant GOP frontrunner.

He began rising in national and Iowa polls after several strong debate performances, including one in which he blasted the moderator for encouraging the Republican-on-Republican quarrels that he claimed to deplore.

Trump began to take notice. By December, Trump was questioning Cruz's position on ethanol policy and the veracity of his faith. By January, Trump unleashed an effective line of attack by questioning Cruz's eligibility to run for the White House since he was born in Canada to an American mother.

Cruz, at times visibly irritated, began to strike back.

Before the Iowa caucuses, he repeatedly questioned Trump's conservative credentials — and those attacks seemed to have an effect. Cruz edged out a small win over Trump in the Hawkeye State, and he was seen as having the potential to go the distance.

Cruz then beat expectations in New Hampshire, finishing third, ahead of Bush and Marco Rubio.

But in South Carolina, the state he hoped would be a springboard to other critical Southern contests, Cruz struggled badly — falling to third place and raising questions about the breadth of his appeal.

On the first Super Tuesday contest, Cruz again fell short with evangelicals, raising doubts about whether he could dominate among the group that was so key to his candidacy.

On Tuesday night, he said he was proud of his campaign and his stand for conservative principles. There was no word yet whether he would pledge his support to the presumptive Republican nominee.