Two weeks after he jolted the political world by winning the Iowa caucuses and finishing a close second in New Hampshire, Pete Buttigieg stopped by a brunch hosted by African American legislators in Las Vegas to mark Black History Month.

Just before he started talking, word came that the buffet was open. Chairs were scraped back, and a snaking line formed. Tables were left vacant, and loud talk filled the room.

When Buttigieg took the microphone, he was forced to yell, doing his best to deliver his message without showing frustration that no one in a room full of black dignitaries seemed to want to hear it. When former vice president Joe Biden took the same stage later that afternoon, the room was raucous at his arrival, then rapt for his remarks.

The episode captured the irony, and ultimately the downfall, of Buttigieg’s meteoric campaign. In an age of identity and representation, Buttigieg, a married gay man, presented himself as a longtime outsider, one who understood what it meant to be shunned and who promised a politics of inclusion. But Buttigieg could never convince African Americans, a pillar of the Democratic coalition and a group for whom representation has moved to the center of public discussion, that he understood their experience or how to fight for their rights.

“He had more broad appeal in those early, mostly white states than any of the other candidates,” said Dan Pfeiffer, a former adviser to then-President Barack Obama. “But ultimately, he was never able to make any gains with nonwhite parts of the electorate. And there’s no path to the Democratic nomination and the presidency that doesn’t include that.”

Perhaps the greatest legacy of Buttigieg’s run is to broaden the nation’s vision of the role of gay Americans in the nation’s political life, as the most successful openly gay presidential candidate ever grew increasingly open about his marriage and his struggles with his sexuality as the months went by.

Yet he found himself Sunday in his hometown of South Bend, Ind., the city where his struggles with racial issues as mayor earned detractors and supporters, telling supporters that “the path has narrowed to a close.”

In the end, Buttigieg appealed to enough voters to vault into serious contention but not enough to lift him higher. He built an improbably broad base that was not broad enough, and when the primary moved to more diverse states, he simply could not keep up.

Buttigieg launched his presidential exploratory committee on Jan. 23, 2019, with a video in which he wore a flannel shirt and sweater, his hair not yet as tightly cropped as it would be by the time he announced he would be leaving the race. The unmistakable flecks of gray hadn’t bubbled up there yet. His face wasn’t quite as gaunt.

Later that day, curious reporters packed a conference room at the Holiday Inn in downtown Washington, peppering Buttigieg with questions about whether his candidacy implied he felt the older generation wasn’t ready to handle the moment, about what being gay might mean to it all.

The same question seemed to underscore all of it: Are you serious?

Buttigieg was serious about trying — that much was clear. From the start, he pitched himself as a unique messenger for a new message: The rise of President Trump had exposed the old ways of operating as flawed and unsustainable. A young mayor from the Midwest might just be the person to handle what lies ahead — and in a field that included senators, former mayors and a former vice president, Buttigieg wanted a chance.

He got more than that, outlasting senators, governors and others far more seasoned.

“He’s a very talented messenger with a very sophisticated understanding of how you communicate in this environment,” Pfeiffer said. “His omnipresence in the media is something Democrats can learn a lot from. . . . He ensured he was always part of the conversation.”

That strategy, built by communications director Lis Smith, allowed Buttigieg to rise to prominence in a field that didn’t seem likely to have much room for someone like him. Along the way, it underlined a key point about politics in the Trump era: Even without experience, money or organization, if a candidate — even an un­or­tho­dox one — knows how to play the media, he can catapult to prominence.

As early favorites such as Sens. Kamala D. Harris (D-Calif.) and Elizabeth Warren (D-Mass.) built multistate organizations, Buttigieg and his husband, Chasten, along with Smith and another staffer, Max Harris, would pile into the car, drive west from South Bend, and try to find Iowans willing to listen to Buttigieg.

The whole thing seemed like a lark to seasoned political analysts; Buttigieg was 37, barely old enough to be president, and he had never even held statewide office. That changed on March 10, when Buttigieg took the stage for his first nationally televised town hall on CNN. Within the Buttigieg campaign, staffers later referred to it simply as “the CNN Town Hall,” although he had since conducted many others.

Something about his delivery, his profile and his demeanor sparked nationwide interest. Boyish and eloquent, Buttigieg seemed simultaneously to answer some Democrats’ urgent desire for an anti-Trump and their long-standing hunger for candidates who are fresh-faced and rhetorically agile, like John F. Kennedy and Obama.

That night also provided a moment of trailblazing, when Buttigieg joked with CNN host Jake Tapper that he and his husband seemed to disagree on how to pronounce his last name. An openly gay presidential candidate had talked about his husband on national television as if it were nothing.

That husband, Chasten, would emerge as something of a cult hero for Buttigieg supporters, who often clamored for pictures with him. An active Twitter account and numerous personal appearances showcased Chasten’s earnest, often humorous style.

Chasten had sat through Buttigieg’s speeches before. But after the CNN town hall, he and his husband were headed for something on a much different scale.

Political analyst David Axelrod recalled hearing almost immediately from two donors asking how they could get in touch with Buttigieg. By the end of the month, Democratic megadonor Susie Tompkins Buell had agreed to host a fundraiser for Buttigieg.

At the time, his campaign staff was just trying to push Buttigieg within striking distance of the donor count needed to qualify for the debate stage. Within 24 hours, he had reached a third of the 65,000 donor threshold. Two days later, his campaign announced it had reached 55,000 individual donors.

This thrust Buttigieg into a whirlwind of attention and travel that spat him out in Los Angeles a week later, where he sat in the back of a black SUV headed through West Hollywood on his way to shake hands with stars such as Greg Louganis and Billy Eichner. Buttigieg said that day he didn’t think the rigors of campaigning for the presidency would require much of an adjustment, but he admitted, “I don’t love repeating myself.”

Buttigieg would spend most of the next few months repeating himself, in television interviews and magazine sit-downs, on CNN town halls and Sunday shows. From the earliest days of Buttigieg’s bid, Mike Schmuhl, a longtime friend turned campaign manager, acknowledged it was a long shot.

“Most people do not equate mayor of a town in flyover country as presidential material, but Pete is special,” Schmuhl said then. “Once people get to know Pete, they are intrigued, interested, supportive right out of the gate.”

If the idea was to get as many people as possible to know him, Buttigieg had a good person to help: Smith. As frenetic as Buttigieg was steady, as prone to expletives as Buttigieg was averse to them, and as intolerant of stillness as Buttigieg was dedicated to it, Smith always seemed like an unlikely partner.

But in the first months of his candidacy — and, as it happened, the last months, as well — Smith made sure Buttigieg was booked on every television show possible. He sneaked calls to broadcast stations on almost every drive, took reporters with him from one event to another, and talked to local cameras whenever they would have him.

So the man who started the campaign without the hefty email lists of his competitors, almost entirely unknown to nonpolitical junkies, raised nearly $25 million in the second quarter of 2019.

With money came staff and the need to scale his operation in less than half the time of some of his competitors. His Iowa state director hit the ground in the first days of May. By September, the campaign was opening 20 offices in the state in 20 days. The Buttigieg campaign had to find what talent was left in other early states, too.

Soon, New Hampshire, South Carolina and Nevada operations sprung up, as well. He hired senior adviser and key strategist Michael Halle — one of the architects behind Buttigieg’s delegate strategy — in July. By August, he had a deputy campaign manager, Hari Sevugan.

But summer also brought tragedy — and with it, the kind of scrutiny Buttigieg had largely avoided. In South Bend, an unarmed black man named Eric Logan was shot and killed by a white police offer.

Buttigieg left the trail and headed home, where he was confronted by anguished South Bend natives arguing he hadn’t taken the proper steps to console Logan’s family, nor to eradicate the systemic racism and bias that provided the backdrop. Black residents of South Bend shouted at him during a contentious town hall.

The South Bend chapter of Black Lives Matter began protesting Buttigieg. National publications dug into his record on issues of race in South Bend, and they found he had struggled to diversify its police force. A national narrative coalesced: Black voters did not like Buttigieg.

More broadly, the shooting raised a crucial question: Was Buttigieg, a young, white, Harvard-educated man from Indiana, the right candidate to lead a diverse party? More to the point: Could he really empathize with the black experience?

Some argued that Buttigieg was being unfairly painted as racially insensitive.

“I do know how it got started — the shooting and the town hall meeting,” said Gladys Muhammad, a black South Bend native who stumped on Buttigieg’s behalf. “Those of us who were not involved and just in the community, we decided not to speak. We decided to let the grass-roots people voice their concerns because they needed to be heard. We wanted that to happen. As angry as they were, they needed to say what they needed to say. We stepped back and didn’t say anything.”

Yet Buttigieg continued to struggle to find answers to questions about race. When he said being gay helped him understand the importance of tolerance and acceptance, it provoked a backlash from those who argued he was equating two very different experiences.

So even as white voters in Iowa and New Hampshire took to Buttigieg, it became increasingly clear that he was winning almost no support among African Americans in more diverse states.

His aides crossed their fingers, hoping success in Iowa and New Hampshire might convince a wider range of voters that Buttigieg could win, could lead Democrats to their urgent goal of unseating Trump.

But Buttigieg’s stunning win in Iowa got muddled in a way that some of his staffers think derailed the plan entirely. Buttigieg took to a Des Moines stage and declared victory, but because of a disastrous series of glitches, it took days for the results to be finalized and Buttigieg to be proved right.

Privately, his advisers point to that as a key pivot point in Buttigieg’s campaign. Instead of delivering a triumphant victory speech on national television to a party eager for a savior, he was slammed for declaring victory prematurely. Instead of a week of coverage of his triumph, outlets focused on the reporting debacle.

By the time the focus shifted to New Hampshire, Sen. Amy Klobuchar (D-Minn.) was staging her brief but important rise: Buttigieg advisers felt her surprise third-place finish there cost Buttigieg a victory, as well as precious attention. He lost to Sen. Bernie Sanders by less than two percentage points, falling short of would have been a stunning victory in the backyard of the independent from Vermont.

Along the way, younger, more liberal Democrats progressives often saw him as a compromise. They felt he relied too much on high-dollar fundraisers to be trusted to change the system. They watched him struggle to amass minority support. And they felt his “Medicare for all who want it” plan, his sliding scale for college tuition relief, and his relatively less expensive plan to combat climate change didn’t go far enough.

He finished third in Nevada, garnering just 2 percent support among black voters. Not long after voting ended in South Carolina, Buttigieg’s aides checked their polling models and realized he probably would fare poorly.

His senior advisers told him what they saw, knowing Buttigieg wouldn’t linger if the prognosis wasn’t good. He didn’t, and was out of the race less than 24 hours later, the upstart candidate so many Democrats said they were waiting for who couldn’t quite transform into the unifying force they were hoping for.

Chasten Buttigieg was the first to take the stage Sunday in South Bend when Buttigieg dropped out. He fought back tears as he told the crowd about the day his husband came home from work and asked him what he thought about running for president.

“I laughed,” Chasten said. “Not at him. Just at life.”

Soon after, he turned things over to his husband, the first openly gay candidate to win delegates in a primary, a candidate who fared so well that he pushed out of mind notions of just how improbable his success was.

Sunday’s announcement is hardly a conclusive end to his political career. If Buttigieg were to run for president in 2056, after all, he would be younger than Biden is now.

“There are disadvantages to running for president when you’re so young, but one of the advantages is you have your whole future ahead of you,” Axelrod said. “Next time there’s a conversation about candidates for president on the Democratic side, it would be surprising to me if he weren’t high up on the list of possibilities.”