"I couldn't get it done," said Mayor Pete Buttigieg, drawing his lips together in frustration. "My community is in anguish right now because of an officer-involved shooting ... it's a mess, and we're hurting."

It was one of the most memorable moments of Thursday night's debate. Ordinarily presidential candidates are anxious to tout their accomplishments. In this case, a rising Democratic star faced the camera and squarely admitted to failure.

How exactly did he fail? The question Buttigieg was answering concerned the racial imbalance in the South Bend police force, where whites constitute about 60 percent of the city's population and nearly 90 percent of the police force. That sort of thing attracts notice after a fatal police shooting, like the one that took place on June 16, when white police officer Ryan O'Neill shot black resident Eric Logan. An investigation is underway, but the optics are undeniably bad. It is, as Buttigieg explained, "a mess."

How this mess affects his campaign remains to be seen, however. Buttigieg hasn't lost much ground with black voters, but you can't lose something you never had. While that isn't necessarily a fatal flaw — if Buttigieg is on the ticket, he could be paired with another candidate who has more appeal for African Americans — he can't afford to pick up a reputation as a racially insensitive child of privilege. That kind of image would alienate the younger voters who are at present his strongest base of support. Buttigieg doesn't need a wave of black support, but he needs enough to quell discussion of his "black problem." For the present, he seems to have done an adequate job containing the crisis; a few dozen protesters are hardly enough to tarnish his national reputation. But the Logan case is far from settled and this is the sort of problem that can flare up again quite literally at any moment.

Moving forward, Buttigieg must take care to do three things. First, he needs to be an executive more than an activist. A man his age can’t afford to be so woke that he starts looking like an undergraduate. Second, he needs to go on discussing the issue thoughtfully, proving to voters he has a nuanced understanding of the broader problems. Third, he must take advantage of the unusual commonalities he does have with many black voters: his military service and his faith.

Lethal police shootings are tragic for a family, demoralizing for a nation, and a public relations nightmare for the politicians involved. Most of us rightly recognize that there is a real causal relationship between our nation's shameful legacy of racial injustice and the deaths of multiple black men each year at the hands of law enforcement. Understandably, activists want a swift political response each time a tragedy occurs. To them, that means indictments, reprisals, and shake-ups in the police department. They want something they can recognize as justice for the deceased.

It's a tricky situation. The thirst for justice is understandable, but a shooting is more than just a symbolic manifestation of a society-wide struggle with anti-black prejudice. It's a discrete event, involving a particular shooter and a particular victim, both of whom are entitled to due process under the law. Even if the mayor were permitted to bypass normal legal proceedings, it would be egregiously unjust to relinquish an officer of the law to the court of public opinion. We aren't even sure what happened in South Bend at this point. What if O'Neill was just doing his job?

At such a juncture, the mayor simply needs to do his job. He’s offered appropriate condolences and cooperated with investigations. It was appropriate at that point to continue on to other business, like repairing roads, or raising gobs of money for his presidential campaign.

Having said that, it would be a mistake for Buttigieg to run away from the issue. Instead, he should continue talking about it, in a way that shows voters the perspective he’s gained through his experiences as mayor. Clearly, policing has become a thorny problem in South Bend, as it is in many American cities. This has been a flashpoint for racial tensions for more than half a century now, from Watts to Ferguson to South Bend. Quite obviously, Mayor Pete isn’t the only person who’s struggled to resolve this issue.

Part of the problem is that racism is a society-wide issue, but policing problems are always local to a very great extent. Neighborhoods have their own dynamics, and so do police departments. Those roots can go deep. Perhaps the older residents of a particular neighborhood have memories of racist, bullying cops, which stretch back 20 or 30 years, to a time when the young Buttigieg was still acing his first-grade spelling tests. Those memories will affect the way residents relate to law enforcement today. That, in turn, might create particular challenges for officers who are trying to keep order and close cases. The police get frustrated, and those feelings reinforce existing prejudice within the department itself. Vicious cycles develop, and it takes time and patience to unwind them. Often there are setbacks, like the one Buttigieg encountered early in his first term, when he felt compelled to fire a popular black police chief who was under investigation from the FBI.

He’s talking about the issue, and he should go on talking. Even if his efforts don’t draw wild applause in South Bend, voters around the country may be impressed by his expertise. As a mayor, Buttigieg actually has more experience with this problem than is typical for a presidential candidate. It’s possible that he can persuade voters to see that as a strength.

Finally, Buttigieg should make the most of those distinctions that he shares with many black voters. He is a military veteran, just like a disproportionate number of black citizens. Black voters are also unusually religious, while Democrats as a group tend to be less devout than the average American. Buttigieg has already made a point of breaking with that trend, advertising himself as a public official with a firm faith. For the most part though, he’s used this as a stick for beating Republicans, rather than explaining why his party should value religion and communities of faith. Woke liberals enjoy hearing their rivals denounced as hypocrites, but that may not do as much for black voters, whose Christian commitments tend to be ignored by a party that’s often uncomfortable talking about faith. Breaking with that trend might be a good way for Buttigieg to convince some black voters that he does have something to offer them.

Until a few weeks ago, everything seemed to be going right for the Buttigieg campaign. They've suffered a setback here, but policing needn't be an Achilles heel for the Democratic wunderkind. It's a long-standing problem, and reasonable people won't expect a 37-year-old to offer a magical fix. He simply needs to do his homework, and offer solid insight.

This time, get it done.