SOUTH BEND, Ind. — As he soared from obscurity to top-tier presidential candidate this year, Mayor Pete Buttigieg rooted his unlikely campaign in an argument he hoped would fit both the moment and his relatively thin resume: What a nation fed up with big government truly needs is to “get Washington to look more like our best-run cities and towns.”

Now that South Bend is in the throes of a crisis over race, policing and city leadership, that rationale is running headlong into the inconvenient reality that when things go sour, mayors can be held immediately and directly responsible in a way that senators and congressman are not.

The recent unrest in South Bend — triggered by the fatal shooting of Eric Logan, a black man, by a white police officer a week ago — has become the most profound hurdle for Buttigieg’s candidacy to date. It has also tested his readiness to confront an issue that seems to call for a visceral, emotional response, rather than the cerebral, levelheaded comportment that has made the 37-year-old mayor seem so unflappable on the campaign trail.

For the first time, cracks in Buttigieg’s composure have publicly emerged, as he’s struggled to find the right tone to respond to piercing questions from his own constituents about whether he’s a racist and what the life of a black person means to him.

As a hastily arranged town hall meeting Sunday in South Bend descended into chaos — with attendees screaming profanities at him, at his police chief and each other — Buttigieg seemed to vacillate between despondency over the jeers, irritation over being interrupted and wonky erudition as he offered explanations about local laws on police misconduct that only further angered the crowd.

Yet once the gathering dispersed after the nearly two-hour meeting, the testiness from Buttigieg seemed to turn to sadness as he fielded questions from reporters. He became visibly emotional when asked whether it had been wise to hold the event given the communal shouting match it ultimately became.

“I just think it’s my job,” Buttigieg said. “I don’t know if it’s smart or not. I don’t know if it’s strategic or not. But it’s my city.”

Buttigieg has tried to explain to his constituents that laws spell out exactly how officer-involved shootings must be handled and potential police misconduct investigated — and that no amount of grief or anger, however warranted, can justify circumventing that process to punish people before the investigation is complete.

Yet in the eyes of many constituents who came to his town hall, that answer was insufficient. So Buttigieg has been left with the futile task of trying to scratch an emotional itch for a grieving community with few options at his disposal, but the eyes of the national media and the Democratic primary electorate watching.

So the young mayor sought to strike a delicate balance, between conceding that his efforts on race and policing to date have been insufficient and gingerly pushing back on “the suggestion that we haven’t done anything.” He said he hoped black Americans watching the town hall would see a city facing the issue of racism head-on, adding, “We’re not running away from it.”

"This problem has to get solved in my lifetime. I don't know of a person or a city that has solved it,” Buttigieg said after the crowd dispersed. “But I know that if we do not solve it in my lifetime, it will sink America."

In the packed 2020 Democratic presidential primary, few candidates bear the political burden that can come from being mayor. This year most of the candidates running are members of Congress, who do not often get blamed for specific incidents or crises in such a personal capacity. Although governors are judged by the well-being of their state — only two incumbents and one former governor are running this year — they are less frequently held responsible for individual incidents such as a shooting on a city street.

Indeed, when Chicago Mayor Rahm Emanuel unexpectedly announced last year that he would not run for a third time, it was widely believed the decision was connected to the uproar over his role in the aftermath of the police shooting of Laquan McDonald in 2014. McDonald’s name has been invoked several times by South Bend residents this past week in comparison with the shooting here a week ago.

While another mayor is running in the Democratic primary this year — New York’s Bill de Blasio — his candidacy has yet to attract anywhere near the level of attention as Buttigieg’s.

And while New York has more than 8.5 million residents, Buttigieg’s position at the helm of a community of roughly 100,000 means that any misstep may ricochet more personally throughout a close-knit community, with the eyes of the national media and the Democratic primary electorate watching.

“For a mayor, it’s different,” Mayor Steve Adler of Austin, Texas, told NBC News. “It’s difficult. In a political situation, everyone is going to be taking that incident and all incidents and putting it through the lens of the campaign.”

“You don’t get to control all of the messaging,” added Adler, who has endorsed Buttigieg. “All you get to control is how you do your job.”

For Buttigieg, the spotlight on his handling of issues of policing and race is one he had invited upon himself long before the shooting in South Bend.

As he worked to explain why he’s more qualified than President Trump or any of his Democratic competitors to occupy the Oval Office, Buttigieg routinely cited his experience in handling precisely this type of situation.

“I know I’m the youngest person in the race,” he told The Washington Post in May. But Buttigieg argued he had what the senators and businessmen and former vice president all lack: “The experience you get as a mayor, handling everything from an economic development puzzle to a racially sensitive officer-involved shooting — literally getting the 3 a.m. call.”

Compounding problems for Buttigieg, the incident in South Bend just so happened to overlap directly with his biggest obstacle as a candidate — his thus-far limited appeal to black voters. After spending weeks honing his message and economic plan for African Americans, Buttigieg was just starting to see the fruits of those efforts in the way of improved poll numbers with black voters in South Carolina when the Eric Logan shooting occurred.

As frustration in South Bend’s African American community has built in the week since, it seems increasingly clear that there is little the mayor could do or say that would sufficiently mollify the community’s desire for immediate, decisive action — save for summarily dismissing the police chief, firing the officers involved or resigning himself.

“I think as mayor of the city, he should be doing something about this. And I just can't even see anything else he is doing because every day I hear a new shooting going on and it's just unacceptable,” said Susan Ellis of South Bend as she left Mount Carmel Missionary Baptist Church services on Sunday morning.

But asked what exactly Buttigieg was failing to do, Ellis replied: “I'm not a politician. He's the mayor, he's the person who should have the ideas.”