Mike Bloomberg dropped out of the presidential race Wednesday after a poor performance in the Super Tuesday contests, and immediately endorsed former Vice President Joe Biden's candidacy.

"Three months ago, I entered the race for President to defeat Donald Trump," Bloomberg said in a statement.

"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," said the former New York mayor and billionaire, who had spent more than $500 million on his candidacy.

"I've always believed that defeating Donald Trump starts with uniting behind the candidate with the best shot to do it. After yesterday's vote, it is clear that candidate is my friend and a great American, Joe Biden," Bloomberg said in the statement.

Bloomberg tweet

"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."

A campaign aide said the two candidates talked Wednesday morning, before the announcement of Bloomberg dropping out, according to NBC News.

Biden accepted Bloomberg's endorsement, saying in a tweet that the focus is on "defeating Donald Trump, and with your help, we're gonna do it."

Biden tweet

Bloomberg's endorsement of Biden is a major boost for the former vice president's campaign.

Biden's efforts will get a lift from Bloomberg's extensive field staff and advertisements that have already been booked in future primary states. Biden will see an assist from Bloomberg's own technology company, Hawkfish. The campaign previously told NBC News that it will keep its operation going, even if Bloomberg was forced to drop out of the race.

Trump gloated about Bloomberg's departure from the contest.

"Mini Mike Bloomberg just 'quit' the race for President," Trump tweeted. "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!"

Trump tweet

Bloomberg's embarrassing finish Tuesday night marked the first time he was on the ballot. Had he continued in the race, his candidacy might have taken away votes from Biden, a fellow moderate who's competing for the nomination with Sen. Bernie Sanders of Vermont. With his departure, there are now only four candidates in the race: Biden, Sanders, Sen. Elizabeth Warren of Massachusetts and Rep. Tulsi Gabbard of Hawaii.

Despite his massive, unprecedented spending, Bloomberg managed to win only American Samoa on Tuesday night when that territory and 14 states were up for grabs.

Warren's own poor performance Tuesday increased speculation that she will be the next big name to drop out of the race.

Warren's campaign manager Roger Lau said Wednesday that the campaign had fallen "well short of our viability goals and projections" on Super Tuesday, and "we are disappointed in the resullts."

"Elizabeth is talking with our team to assess the path forward," Lau wrote in a message to campaign supporters, which was published on Medium.com.

"She's going to take time right now to think through the right way to continue this fight. There's a lot at stake for this country and the millions of people who are falling further and further behind," Lau wrote. "This decision is in her hands, and it's important that she has the time and space to consider what comes next."