The timing of the announcement stunned O’Rourke’s supporters and local staff, many of whom had risen before dawn to place campaign signs throughout the city. An adviser said O’Rourke had finalized his decision by early Thursday, when a small clutch of aides were first informed.

A campaign adviser said O’Rourke will not run for Senate next year, despite persistent prodding. Leaving the gathering, O’Rourke declined to answer several questions about his departure from the race. But he said he will do “whatever I can for this country, no longer as a candidate, but with my fellow Americans.”

The announcement came as candidates gathered here for events over the weekend. Supporters and staffers waiting for O’Rourke at a pre-dinner rally saw the occasion turn into a wake.

“This is not what I thought would happen here tonight,“ said one supporter to another, as a light drizzle fell.

But inside O’Rourke’s campaign, disquiet surrounding his poll numbers — and more importantly, his fundraising — had been growing for weeks, and some staffers were already testing the waters for a possible jump to other campaigns.

It was a far cry from the beginning of O’Rourke’s mercurial run, which kicked off amid tremendous fanfare in March. Massive crowds followed him from VFW halls to bar rooms throughout Iowa, and his first 24 hours of fundraising — $6.1 million — was sufficiently staggering to suggest a deep run.

But O’Rourke, a little-known congressman before his near-miss Texas Senate campaign against Ted Cruz captured the party’s imagination, was far less tested than more experienced competitors. He was pummeled for his initial lack of policy specifics and late-arriving campaign organization. He announced his presidential run before installing a campaign manager, and it took him months, in some cases, to announce key hires. The lack of early organization was widely viewed as a critical error.

“The world is full of people who can crush a Double A baseball,” James Carville, the former Bill Clinton strategist, said earlier this week. “And the first time they see a big league change-up, it looks like a pretzel. This is a hard game to play.”

He said, “I just think the guy [O’Rourke] was a remarkable Double A guy.”

By the time O’Rourke quit the race on Friday, his exit from the race had become a foregone conclusion. Only the timing was uncertain. O’Rourke said his wife, Amy, was not in attendance because “this is a decision that we made so recently and so reluctantly that she can’t be here in person.”

Of all the 2020 contenders, his fall was perhaps the steepest. Only a year ago — even before he entered the race — many prominent Democrats and activists considered O’Rourke to be a top-tier contender even in a crowded field filled with party luminaries.

Donors held off throwing their support to other candidates while they waited for him to decide on a run, and the sheer size of his fundraising list terrified rival candidates.

But O’Rourke faded in polls in recent months to such a degree that he was unlikely to qualify for the next party-sanctioned primary debate later this month. Of the two-dozen polls for the debate, O’Rourke had only scored at least 3 percent in two of them — half the number he would have needed by the Nov. 13 deadline to make the stage.

O’Rourke’s advisers believed they still could qualify for the November debate. But an adviser acknowledged that the uncertainty about O’Rourke’s ability to qualify, as well as more stringent criteria for the December debate, had been one factor among many in his decision.

In the wake of O'Rourke's withdrawal, Democratic National Committee Chairman Tom Perez fielded questions about whether the debate qualification rules had culled the field in a way that supplanted the role of the Iowa caucuses. Perez said if a candidate could not poll in the low single digits, perhaps their candidacy wasn't viable after all.

"No candidate in the history of the Democratic primary who was under 4 percent in December has gone on to win the Democratic primary," Perez said.

"Congressman O'Rourke is a firm believer in the notion that a rising tide can indeed lift all boats,” he added. “I appreciate what he brought to the table."

At a rally in Tupelo, Mississippi, President Donald Trump mocked O’Rourke, a fierce critic.

“Ah that poor bastard, poor pathetic guy,“ Trump said.

Referring to O’Rourke’s much-criticized comments in a March Vanity Fair story, the president said, “Anybody that says he was born for this, they’re in trouble.”

O’Rourke was expected to return home to El Paso, Texas, on Saturday morning.

Natasha Korecki, Alex Thompson and Steven Shepard contributed to this report.

