Pete Buttigieg, the 38-year-old mayor who rose from obscurity to become the first gay candidate in history to win a presidential primary, suspended his campaign Sunday night, saying he saw no path to win the Democratic nomination.

Buttigieg fell short in his quest for the nomination, but no Democrat this cycle did more to boost his political career. The former mayor of South Bend, Ind., entered the race with no name recognition, natural constituency or personal wealth. He leaves it as one of the party’s brightest young stars. A polished speaker and disciplined performer with a knack for persuasion, Buttigieg built a strong national organization, proved an able fundraiser and rode a message of unity to a surprise victory in the first-in-the-nation Iowa caucuses before faltering in his attempts to build a diverse coalition in later states.

The Iowa triumph was a stunning milestone for gay Americans, who won the right to marry nationwide less than five years ago. The last Democratic president did not support same-sex marriage rights until the end of his first term, in 2012. The fact that an unknown mayor and his husband would be considered a potential First Family crystallized just how far and how fast the nation has evolved on marriage equality. Buttigieg’s sexuality was never the cornerstone of his presidential bid—he neither emphasized nor shied away from the subject on the campaign trail—but that was by design. His success as a gay politician was most remarkable for how unremarkable it felt.

Supporters wait in the rain April 14 for Buttigieg’s presidential campaign announcement in South Bend. Elliot Ross for TIME

His campaign was always a long-shot, but for a few fleeting weeks it seemed like a long-shot that just might work. Iowa was Peteland, full of the white Midwestern moderates—and some waffling Trump voters, who he called ”future former Republicans”—who made up the base of Buttigieg’s support. If he won Iowa, the thinking went, it might propel him into position as the moderate frontrunner in later states.

The chaotic reporting of the caucus results thwarted that plan. Even though Buttigieg was ultimately certified the winner of the most delegates in Iowa, he was denied the narrative he needed to catapult into New Hampshire. And Amy Klobuchar’s surprisingly strong performance in New Hampshire ate away at his support in that state, which meant Buttigieg went into the later, more diverse contests without the momentum he needed to overcome his anemic support from voters of color.

“It has always been the case that Pete needed to achieve escape velocity in Iowa and New Hampshire, and do so well into those states that he would propel himself into the mix in Nevada and potentially South Carolina. He almost did it,” says veteran Democratic strategist David Axelrod. “But that’s the nature of these things. Circumstances conspired against him, and he didn’t get the bounce that he needed to get a second look in these later states.”

The timing of Buttigieg’s exit reflected the sense of urgency among Democratic donors and operatives to coalesce around a candidate capable of stopping Sanders’ momentum. Former Vice President Joe Biden’s cemented his position as the likeliest beneficiary with his landslide victory in South Carolina on Saturday night. One high-level campaign staffer said Buttigieg is stepping out now because he “believes this is the right thing to do for our country” and thought it was the best move to “heal our divided nation, defeat this president, and work to fix our broken politics.”

Buttigieg meets supporters at a Town Hall in Mason City, Iowa, on Jan. 29. September Dawn Bottoms for TIME

But the move was not purely altruistic. Buttigieg’s struggles in Nevada and South Carolina laid bare his campaign’s central weakness: he was never able to broaden his base beyond educated white liberals and moderates. As a millennial with no national political experience, he relied heavily on his record as mayor of a small Midwestern city, but that record proved to be more complicated than it appeared. The shooting of a black man by South Bend police in 2019 put a spotlight on Buttigieg’s failure to diversify his city’s police department, and South Bend’s persistent racial inequality complicated his campaign narrative of rebuilding a struggling American city. After the news broke on Sunday, the South Bend chapter of Black Lives Matter released a statement saying they were “excited” to hear that he had suspended his campaign. “We hope that he learned his lesson,” they said, “that neoliberalism and anti-Black policies will no longer be tolerated.”

It was clear Buttigieg’s path to the nomination had shrunk to a hair’s breadth. In the final days of the race, he shuffled strategies repeatedly—casting himself as a unifier one day, going hard at Senator Bernie Sanders as a threat to the party the next. His always-gauzy rhetoric shaded into borderline Obama plagiarism.

Even though Buttigieg was campaigning on a message of generational change, he never won over voters his age, who largely support Sanders. He frequently attracted the mockery of his fellow millennials, many of whom saw him as a technocrat who was more swayed by big donors than grassroots movements. “Once he became a darling of the donor class, he deployed his rhetorical skill against the progressive movement he once tried to find a place in,” says Waleed Shahid, communications director for the progressive group Justice Democrats. “I hope he joins with the rest of his generation powering a progressive movement that will become increasingly essential to the Democratic party’s future.”

Supporters at Buttigieg's rally in Nashua on Feb. 11. M. Scott Brauer for TIME

Just five days ago, Buttigieg campaign manager Mike Schmuhl published a memo describing a “definitive path” to the nomination, arguing that Buttigieg was the candidate best positioned to beat Sanders. The document outlined a plan to minimize Sanders’s wins on Super Tuesday and rack up delegates in the later March contests. But facing the prospect of a dismal showing on Super Tuesday, Buttigieg calculated that it was better to exit now than to stay and play spoiler.

One staffer says the decision was made Sunday morning, in the aftermath of the South Carolina results. “He gave this a hard look today, and has probably been thinking about this for some time,” says another top staffer. “He got into this race because he thought the country was truly divided to the point where we couldn’t get stuff done. And when his candidacy no longer has a pathway to do that, he is deciding to spend the campaign to lay out what’s next and how you do that in a different role.”

“He wants to bring the party together, the country together, and does not see a clear path for him to get the nomination,” the staffer says.

In the wake of Biden’s wide victory in South Carolina on Saturday night, undecided donors had begun to rally around the former Vice President. “Most are saying they still love Pete, Elizabeth, Amy or Mike,” says Rufus Gifford, a Biden fundraiser who served as finance chair for Barack Obama’s 2012 re-election campaign. “But after last night, they see the writing on the wall.”

That’s not to say all Buttigieg’s backers were abandoning him: two donors, who requested anonymity to speak candidly, told TIME they were blindsided by the candidate’s abrupt exit and dismayed to learn of it through media reports on Sunday.

Buttigieg speaks at a Town Hall in Ankeny, Iowa, Jan. 30. September Dawn Bottoms for TIME

But Buttigieg is a politician who calculates every word and every move. Though he put his stewardship of South Bend at the center of his campaign, it’s also true that Buttigieg has for some time been looking for a way to escape his hometown. In 2017, he mounted a losing campaign for the chairmanship of the Democratic National Committee, at the age of 36.

“One thing is clear: He has a future,” says Axelrod. His exit was about preserving it.

Buttigieg’s candidacy—while groundbreaking—should be seen as a milestone on a march, not something that happened overnight, argues Jerry Birdwell, who made history in 1992 when Texas Gov. Ann Richards appointed him as the first openly gay judge in the state. He was in the crowd for an Elizabeth Warren event on Feb. 6 in Derry, N.H., just talking with the gathering group. “I know what I went through as a gay man appointed in politics. He’s done a lot to address people’s fears. What he’s done is wonderful,” says Birdwell, who now lives on Massachusetts’ Cape Cod. “If he doesn’t win, he’s paved the way for another gay man to seek that office. He’s done an awful lot for us as gay men.”

Even on his final day in the race, Buttigieg was busy building bonds in the party. He and his husband, Chasten, had breakfast Sunday morning in Plains, Ga., with former President Jimmy Carter and his wife Rosalynn. After that, he traveled to Selma, Ala., to join marchers commemorating the 55th anniversary of the “Bloody Sunday” march at the height of the civil-rights movement. A keen political strategist, Buttigieg knew that his failures with black voters doomed him in 2020. It was almost as if his last act of this campaign was the first step toward the next one.

With reporting by Alana Abramson and Phil Elliott/Washington

Get our Politics Newsletter. The headlines out of Washington never seem to slow. Subscribe to The D.C. Brief to make sense of what matters most. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Write to Alex Altman at alex_altman@timemagazine.com and Charlotte Alter at charlotte.alter@time.com.