Washington (CNN) Pete Buttigieg ended his campaign for President Sunday night, concluding the White House bid that vaulted the once-unknown mayor from South Bend, Indiana, to a top presidential contender.

Buttigieg officially made the announcement during a hastily planned event on Sunday in South Bend, where the former mayor said "today is a moment of truth... the truth is the path has narrowed to a close, for our candidacy, if not for our cause."

"So we must recognize that at this point in the race the best way to keep faith with those goals and ideals is to step aside and help bring our party and our country together," Buttigieg said. "So tonight, I am making the difficult decision to suspend my campaign for the presidency."

Buttigieg added: "We have a responsibility to concede the effect of remaining in this race any further. Our goal has always been to help unify Americans to defeat Donald Trump and to win the era for our values."

Buttigieg's run was historic. He is the first openly gay man to launch a competitive campaign for president, and he broke barriers by becoming the first gay candidate to earn primary delegates for a major party's presidential nomination.

After initial success in Iowa and New Hampshire, Buttigieg's campaign struggled to win over voters of color, a key base to the Democratic Party, which hurt his performance in Nevada and South Carolina, two states where Buttigieg finished significantly behind the race's frontrunners.

Buttigieg was scheduled to fly from Selma, Alabama, to Dallas, Texas, on Sunday, but during the flight he informed reporters that he would be flying back to his hometown of South Bend to make an announcement on the future of his campaign. That announcement, aides said, is that he is ending his run

Buttigieg made the decision on Sunday, aides said, after he struggled to compete in South Carolina's primary and had little path toward success on Super Tuesday.

"He believes this is the right thing to do right now for our country and the country to heal this divided nation and defeat President Trump," the aide said.

The aide added: "He decided that now was the time and, I think that is exactly why he is getting out. He believes this is the right thing to do."

Buttigieg did not endorse one of his former competitors on Sunday night, and instead used the moment to laud all of his competitors for "demonstrating what public service can be."

Former Vice President Joe Biden and Buttigieg have yet to connect but the two have traded voicemails today, a Biden aide tells CNN. A separate source familiar with the matter told CNN that there has been staff-level communication between the Buttigieg and Biden campaigns tonight, however.

Buttigieg ended his campaign with little-to-no path toward the nomination, a fact he acknowledged on Sunday.

"He studied the math," a top Democrat familiar with the Buttigieg campaign said. "He knew there wasn't a path forward."

Buttigieg signaled throughout the final weeks of his campaign that he was aware the race was coming to a close. As Buttigieg warned supporters against nominating Vermont Sen. Bernie Sanders and his "inflexible, ideological revolution," his campaign released a memo days later worrying that Sanders could enjoy a "seemingly insurmountable delegate lead" after the Super Tuesday contests.

In the end, Buttigieg didn't make it to Super Tuesday.

Buttigieg's campaign, though, impressed a host of Democratic heavyweights, many of whom see the former mayor as a key figure in the future of the party. What comes next for the mayor remains unclear -- some top Democratic officials have speculated about a possible Cabinet position in a Democratic administration or another attempt at becoming the Democratic National Committee chairman, a job he ran for and lost in 2017.

That future was front of mind to the supporters in the audience in South Bend who began chanting "2024! 2024! 2024!" after he ended his run.

"I know that as this campaign ends, there comes disappointment that we won't continue," Buttigieg said, nodding to his future. "But I hope that everyone who has been part of this in any way knows that he campaign that you have built and the community that you have created is only the beginning of the change that we are going to make together."

Results of the Iowa caucuses

Buttigieg takes the stage to address supporters during his caucus night watch party on February 03, 2020 in Des Moines, Iowa.

The former mayor's top advisers believed that a win in Iowa would propel Buttigieg to turn in strong performances in New Hampshire and Nevada. That success, they believed, would be followed by a fundraising boost, allowing them to nationalize the campaign by the time Super Tuesday rolled around in early March.

That strategy, however, ran into several challenges. The results of the Iowa caucuses were repeatedly delayed due to mistakes by the state party, denying Buttigieg the ability to fully tout that he won more delegates out of the state than any other candidate.

And one of Buttigieg's primary opponents, Minnesota Sen. Amy Klobuchar , delivered a strong debate performance before the New Hampshire primary and turned in a surprising third place finish in the state, possibly siphoning votes from the former mayor.

Adding to Buttigieg's challenges was the presence of former New York Mayor Michael Bloomberg and the hundreds of millions the billionaire was spending. Bloomberg provided voters yet another alternative to consider, thwarting Buttigieg's attempt to coalesce moderate Democrats.

Buttigieg entered the 2020 race as a relative unknown, launching his exploratory committee from a windowless conference room in Washington, DC.

"The case here is simple," Buttigieg said at the time. "It is time for a new generation of leadership in our country."

For months, the candidate toiled in obscurity, one of nearly two-dozen Democrats running for the chance to take on President Donald Trump . But Buttigieg got his break when a CNN town hall in Austin, Texas, last March introduced Democratic voters to the young mayor, leading to a steady climb in polls and a significant boost to his fundraising.

"It reminded me of early Obama and the shooting-fish-in-a-barrel phenomenon," Rep. Don Beyer of Virginia, Buttigieg's first congressional endorser, said at the time. "Everyone I called (to ask for money) said yes."

Early momentum

Buttigieg speaks during the CNN Democratic Presidential Town Hall at SXSW at ACL Live at the Moody Theater in Austin, Tex., on March 10, 2019.

Buttigieg officially launched his campaign in April with an event that used his hometown -- South Bend -- as a character in his presidential pitch. His campaign picked the hollowed interior of the once bustling Studebaker plant as the site of his launch, a visual symbol of the struggles his city has faced.

"There's a long way for us to go. Life here is far from perfect. But we've changed our trajectory and shown a path forward for communities like ours. And that's why I'm here today," Buttigieg said as rain audibly beat down on the steel roof above him and as the lectern in front of him visibly took on water.

Buttigieg raised more than $80 million during his 2020 run, including an impressive $25 million haul in the second quarter of 2019 that allowed the former mayor to invest heavily in Iowa, a state where he and his top aides believed his Midwestern roots, veteran status and focus on faith could build a broad coalition of support across the state.

But Buttigieg's fundraising success was not everlasting. The campaign entered February with just $6.6 million in the bank and they struggled to hit their goal of raising $13 million in the weeks leading up to Super Tuesday.

Part of the problem was a decline of small dollar donors. The percentage of Buttigieg's fundraising from small dollar donors -- over time -- has fallen from 65% in early 2019 to just 29% in January, according to his financial filings.

Lack of support from black community

Some of Buttigieg's early momentum was also stalled by persistent questions about his appeal to communities of color, an issue that was highlighted in June, when black South Bend resident Eric Logan was shot and killed by a police officer. The subsequent protests forced Buttigieg off the campaign trail for nearly a week, including skipping a key campaign event in South Carolina.

"Maybe the level of attention on this will help us do some good," a visibly emotional Buttigieg told reporters after a particularly contentious June town hall in South Bend over the police shooting. "Because everybody has got to be a part of it. There is just no running away from it, not for me."

Although Buttigieg often pushed back against progressive criticism by noting, should he win, he'd be the most progressive president in a generation, he offered voters a more moderate approach than Sanders. This was clearest on health care, where Buttigieg often touted his "Medicare for all who want it" plan, a more scaled back version that would provide a public option, but allow people to keep their private health insurance if they chose.

As the race dragged on, though, Buttigieg's central argument became that the Democratic Party should look to their past success and nominate a younger candidate from outside Washington, DC.

"When it comes to electability, every single time my party has won the presidency in the last 50 years, it's been with a candidate who was new on the national scene, hadn't spent a lot of time in Washington, and represented a new generation of leadership," Buttigieg often said.

The line morphed into a direct attack on former Vice President Joe Biden , who Buttigieg criticized repeatedly as a backward-looking candidate. He touted what Biden was able to accomplish during the Obama administration, but at a debate in New Hampshire added, "those achievements were phenomenally important because they met the moment, but now we have to meet this moment, and this moment is different."

"I hear Vice President Biden saying that this is no time to take a risk on someone new," Buttigieg said in Decorah, Iowa, days before the Iowa caucuses. "But history has shown us that the biggest risk we could take with a very important election coming up is to look to the same Washington playbook and recycle the same arguments -- and expect that to work against a president like Donald Trump."

Democratic presidential candidates Bernie Sanders and Pete Buttigieg participate in the Democratic debate in Des Moines, Iowa, on January 14.

Buttigieg also ran hard against Sanders at the end of his campaign, raising questions about the self-identified Democratic socialist and the impact that nominating a "divisive" candidate could do to down ballot races.

"If you want to keep the House in Democratic hands, you might want to check with the people who actually turned the house blue," Buttigieg said at the South Carolina debate in February. "Forty Democrats... They are running away from your platform as fast as they possibly can. I want to send those Democrats back to the United States House."

And he attempted to warn Democrats after Sanders' victory in New Hampshire that the Vermont senator could be the prohibitive favorite after Super Tuesday.

"We've got to wake up as a party," Buttigieg said during a January debate in Las Vegas. "We could wake up two weeks from today, the day after Super Tuesday, and the only candidates left standing will be Bernie Sanders and Mike Bloomberg, the two most polarizing figures on this stage."

It was that intense focus on Sanders that hinted at Buttigieg's inner thinking: Without taking down the race's frontrunner, Buttigieg's run would effectively end once the Vermont senator began to amass enough delegates to make it impossible for others to catch him.

Buttigieg made it clear to aides for weeks that he was not willing to run just for the sake of running.

A senior Buttigieg aide told CNN in January -- before voting even began in Iowa -- that the mayor was not interested in sticking with a campaign that had no chance of winning.

"He is not in the business of diddling around," the senior aide said in January. "We are going big and we have got a lane to win. If that doesn't work out, there is no point in running."

This story is being updated.