New York — After spending more than half a billion dollars and winning an estimated 31 delegates on Super Tuesday, former New York Mayor Mike Bloomberg ended his presidential run in the face of a stinging rejection by Democratic primary voters, saying he no longer has a path to the nomination.

Bloomberg released a statement saying he would be leaving the race and endorsing Joe Biden.

"Three months ago, I entered the race for President to defeat Donald Trump. Today, I am leaving the race for the same reason: to defeat Donald Trump — because it is clear to me that staying in would make achieving that goal more difficult," he said. "I'm a believer in using data to inform decisions. After yesterday's results, the delegate math has become virtually impossible — and a viable path to the nomination no longer exists."

It's been a little over three months since Bloomberg joined the Democratic primary race. Though he had initially declined to run in 2020, the billionaire entered the campaign fray because he had no confidence that anyone in the field could beat President Trump in November.

Get updates from the campaign trail delivered to your inbox Click here to view related media. click to expand

"I started watching and listening to the candidates," he said on "60 Minutes" on Sunday. "And they had ideas that made no sense to me whatsoever. Donald Trump is going to eat them for lunch."

But Bloomberg said Wednesday that it had become evident Biden is the candidate to unite behind with the best chance at defeating Mr. Trump in November.

"I've known Joe for a very long time. I know his decency, his honesty, and his commitment to the issues that are so important to our country — including gun safety, health care, climate change, and good jobs," he said in his statement. "I've had the chance to work with Joe on those issues over the years, and Joe has fought for working people his whole life. Today I am glad to endorse him — and I will work to make him the next President of the United States."

Biden thanked Bloomberg for his support and praised the former New York City mayor for his work combatting climate change and ending gun violence. "This race is bigger than candidates and bigger than politics. It's about defeating Donald Trump, and with your help, we're gonna do it," Biden said in a tweet.

Bloomberg had hoped for a strong showing in Virginia, where he announced his candidacy in late November, and in other states like Tennessee, North Carolina and Oklahoma. But Biden won all of those states on Tuesday. Bloomberg captured only American Samoa.

He ended up spending a stunning $570 million on total advertising over the course of his candidacy, amounting to $18 million per delegate he ultimately won.

In Virginia, Bloomberg spent nearly $18 million on advertising in the weeks running up to Super Tuesday. The deluge of spending did little to persuade voters in the state — exit polling showed 56% of them had a negative view of Bloomberg, compared to 39% who viewed him favorably.

Click here to view related media. click to expand

Bloomberg's path to the nomination had already become less clear after his lackluster debate performance and the resurgence of Biden in the South Carolina Democratic primary.

From the start, Bloomberg bucked the political norms of presidential campaigning. Opting to skip the first four early voting states entirely, Bloomberg flooded television, radio and digital markets nationwide and in the Super Tuesday states, outspending every other candidate in the field, to the tune of tens of millions of dollars in some states.

On the campaign trail, he spent little time in the photo line taking pictures with voters, and declined to take questions, something most of his competitors did. Instead, Bloomberg held comparatively short events that had the production value of a general election rally. Bloomberg focused heavily on Super Tuesday and battleground states. During an election night event in West Palm Beach, Bloomberg showed no signs he planned to drop out.

"In just three months, we've gone from 1% in the polls to being a contender for the Democratic nomination for president," Bloomberg told the crowd of supporters Tuesday. "If I'm the nominee, let me make you this promise: we will beat Donald Trump here in Florida and in swing states around the country."

Following the results in Iowa and New Hampshire, which showed Sanders in a strong position, the Bloomberg campaign saw an opportunity to capitalize on moderate candidates splitting the rest of the field, calling on others to drop out and rally behind him as the only viable alternative to Sanders. A campaign memo suggested the race for the nomination was between two candidates, Bloomberg and Sanders, and also warned that if Sanders were the nominee, he would eventually lose to Mr. Trump in the fall.

Although Bloomberg used his large network of support from mayors across the country and organizations like Every Town and Moms Demand Action, the former mayor and one-time Republican had a hard time distancing himself from his past.

He was also never able to completely put behind him his mayoral administration's implementation of the controversial policing practice, stop-and-frisk. Questions surrounding past comments he is alleged to have made to women who worked for his company, Bloomberg LP, also surfaced as his campaign built momentum. In February, after pressure from fellow Democratic contender and Elizabeth Warren, Bloomberg released three women from non-disclosure agreements in an effort to promote more transparency at his company.

A constant target of Mr. Trump, Bloomberg made his intentions clear from at every speech that his focus was beating Mr. Trump in the general election.

The president continued his trend of attacking Bloomberg after he announced his decision to leave the presidential race and rejected the notion that Biden will ensure he is a one-term president.

"Mini Mike Bloomberg just 'quit' the race for President. I could have told him long ago that he didn't have what it takes, and he would have saved himself a billion dollars, the real cost," he wrote on Twitter. "Now he will pour money into Sleepy Joe's campaign, hoping to save face. It won't work!"

Mini Mike Bloomberg just “quit” the race for President. I could have told him long ago that he didn’t have what it takes, and he would have saved himself a billion dollars, the real cost. Now he will pour money into Sleepy Joe’s campaign, hoping to save face. It won’t work! — Donald J. Trump (@realDonaldTrump) March 4, 2020

Ed O'Keefe, Jenna Gibson and Sarah Ewall-Wice contributed reporting.