“I entered the race for president to defeat Donald Trump, and today I am leaving the race for the same reason: To defeat Donald Trump, because staying in would make it more difficult,” Bloomberg told the crowd at the Sheraton hotel.

Bloomberg’s exit comes hours after a disastrous showing in the Super Tuesday primaries, which netted the former mayor only a single first-place victory in the territory of American Samoa.

After failing to win any states, he said he realized the numbers would never add up for him.

“The delegate math had become virtually impossible, and a viable path to the nomination just no longer existed,” he said. “I will not be our party’s nominee, but I will not walk away from the most important political fight of my life and I hope you won’t walk away either.”

The former mayor urged his supporters to get on board with Biden’s campaign, saying taking down Trump would require “uniting behind the candidate with the best shot to do it, and after yesterday’s vote, it is clear that candidate is my friend and a great American, Joe Biden.”

Still, Bloomberg took a moment to speculate about what might have been. “There is no doubt in my mind we would have beaten Donald Trump in November,” he said. “And you know who else knows that? Donald Trump. He’s scared stiff of us, and for good reason, because every time he hit us, we hit back twice as hard.”

Despite his massive spending, he said he always recognized his campaign was a longshot.

"I knew what this race would be all about, and I knew we didn't have much of a chance, but we did it anyways," he said.

Bloomberg made an extremely late entrance into the race last November when it appeared as though Biden’s campaign was faltering. His late entrance into the race kept him from appearing on the ballot in the retail politics-heavy first four states of Iowa, New Hampshire, Nevada and South Carolina.

The former mayor dumped more than half a billion dollars into his campaign, investing in a vast ground game, blanketing the airwaves with ubiquitous ads and campaigning in Super Tuesday states while his rivals were focused on Iowa and New Hampshire. And it appeared for a time that his spending was paying off as Bloomberg quickly shot up in the polls. But his bid began to come undone after an abysmal performance in the first primary debate he participated in, where Sen. Elizabeth Warren savaged Bloomberg over his treatment of women, his wealth, and his defenses of past policies like stop and frisk.

Coupled with Biden’s resurgence after a commanding victory in South Carolina last weekend, Bloomberg’s surge to top-tier status in the polls appeared to stall out, culminating in his disappointing showing Tuesday night. Bloomberg spoke with Biden on Wednesday, per a person familiar with their conversation, who declined to share further details.

The mayor had told reporters less than 24 hours earlier that his path to the nomination rode mostly on the hope of a contested convention, but bristled when asked whether he would drop out in order to consolidate the moderate vote in a bid to defeat Bernie Sanders.

Bloomberg’s endorsement of Biden comes after two of the former vice president's chief rivals in the moderate lane — Sen. Amy Klobuchar and former South Bend, Ind., Mayor Pete Buttigieg — ended their bids and backed the former vice president in a show of centrist unity.

Bloomberg has long said that even if he did not become the Democratic nominee, he would continue spending his vast fortune in favor of that candidate in order to defeat Trump in November, a pledge he reiterated upon dropping out.

He appeared to choke up as he thanked staffers and wrapped up his speech, saying, “I’m sorry we didn’t win, but it’s still the best day of my life, and tomorrow will be even better.” He recalled as a child memorizing the Revolutionary War poem Paul Revere’s Ride, which tells of lanterns hung at Boston’s Old North Church.

“We will not allow any president to dim that light,” he said.

Christopher Cadelago contributed to this report.