Former Texas Congressman Will Hurd, announced Monday he was suspending his longshot 2024 presidential campaign and endorsing Nikki Haley.

“While I appreciate all the time and energy our supporters have given, it is important to recognize the realities of the political landscape and the need to consolidate our party around one person to defeat both Donald Trump and President Biden,” Hurd said in a statement.

Hurd added that Haley, the former U.S. ambassador to the United Nations, was the best alternative to Trump and has “an unmatched grasp on the complexities of our foreign policy.”

Hurd’s announcement came less than four months after the Bexar County Republican launched his campaign, promising to take on Trump in a primary where many candidates were pulling punches. A former CIA officer and unapologetic moderate, Hurd represented Texas’ 23rd Congressional District from 2015-2021.

Hurd stood out for his willingness to explicitly criticize Trump on the campaign trail. During one memorable moment, Hurd was booed at an Iowa GOP dinner in July after declaring Trump is “running for president to stay out of prison.”

But Hurd could not build nearly enough support in a GOP primary that Trump has only increasingly dominated. He rarely got more than 1% in polling and failed to qualify for the two debates that have been held so far. Part of that was due to the fact he refused to sign a pledge to support the eventual nominee, saying he would never back Trump.

Hurd nonetheless was a go-to Trump critic on cable news, especially as the former president racked up indictments over the summer. Hurd also became critical of another primary opponent, entrepreneur Vivek Ramaswamy, suggesting he “wanted to kiss the butt of Vladimir Putin” over his opposition to additional Ukraine aid.Hurd further sought to distinguish himself last month by releasing an artificial intelligence policy platform, the first in the primary.

But in his statement Monday, he acknowledged he had not gathered enough support to continue the race. He urged Republicans to coalesce behind one alternative to Trump, warning that if they do not, “we will repeat the same errors as in 2016” when Trump capitalized on fractured opposition.

He said he was especially confident of Haley’s abilities in national security, a focus of his own political career. Haley has been working to usurp Florida Gov. Ron DeSantis as the main GOP alternative to Trump.

She has been a major draw from some of the top GOP donors in Texas, and she visited the state last week for fundraising.

Haley thanked Hurd for his support in a tweet.

“We have a country to save!” she said.

Hurd had been the only Texan in the primary with elected experience. The state’s politicians have had a far more prominent role in the past two presidential races, with Republicans Rick Perry and Ted Cruz running in 2016 and Democrats Julián Castro and Beto O’Rourke running in 2020.

This article originally appeared in The Texas Tribune, a member-supported, nonpartisan newsroom informing and engaging Texans on state politics and policy. Learn more at texastribune.org.

Patrick Svitek is the primary political correspondent for The Texas Tribune and editor of The Blast, the Tribune's subscription-only daily newsletter for political insiders.