Will Hurd, a Republican former congressman from Texas who was once seen as a rising star in the G.O.P., announced on Monday that he would suspend his campaign for president. He endorsed Nikki Haley, the former U.N. ambassador and governor of South Carolina.
Mr. Hurd entered the 2024 Republican primary race in June with a video that directly criticized former President Donald J. Trump, positioning himself among a handful of explicitly anti-Trump candidates. But he struggled to gain traction with voters and failed to qualify for both the first and second Republican National Committee debates.
“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,” Mr. Hurd wrote on X, the platform formerly known as Twitter. “I urge donors, voters, and other candidates to unite around an alternative candidate to Trump.”
“If the Republican Party nominates Donald Trump or the various personalities jockeying to imitate his divisive, crass behavior, we will lose,” Mr. Hurd wrote.
The Trump campaign did not immediately respond to a request for comment.
Mr. Hurd had banked on his long-shot bid’s resonating with a swath of voters who do not want to see Mr. Trump win the nomination but oppose President Biden’s re-election.
He pitched himself as a modern, moderate Republican who could appeal to swing voters and work across the aisle — a message at odds with the hyperpartisan mood in his party. He pushed back against the culture-war messaging embraced by others in the race — he criticized “banning books” and attacks on the L.G.B.T.Q. community — while casting Mr. Trump as a “loser” who he said was “running to stay out of prison.”
But a vast majority of polls showed his support at far below 1 percent in a race heavily dominated by the former president.
In endorsing Ms. Haley, Mr. Hurd said that he had sought a candidate who could “unite us” and “navigate the complex challenges we face, particularly when it comes to our national security.”
“Ambassador Haley has shown a willingness to articulate a different vision for the country than Donald Trump and has an unmatched grasp on the complexities of our foreign policy,” he said.
Ms. Haley thanked Mr. Hurd for the endorsement. “America is at a crossroads and it’s time to come together and make Joe Biden a one-term president,” she wrote on X.
In 2017, Mr. Hurd gained attention for a cross-country road trip with Beto O’Rourke, a Democrat who at the time served in a neighboring House district. After flights were canceled in San Antonio because of a storm, they decided to travel 1,600 miles by car back to Washington in a show of bipartisan good will.
Mr. Hurd represented a competitive, heavily Latino district in Texas, and when he left office in 2021, he was the only Black Republican in the House.
Even if Mr. Hurd had met the criteria for appearing on the debate stage, it’s unclear whether he would have been permitted to participate. Mr. Hurd said he would not sign a pledge to support the party’s eventual nominee — part of the R.N.C.’s debate requirements — because he did not plan to support Mr. Trump under any circumstances.