SOUTH BEND, Ind. — Pete Buttigieg had been mayor just 13 weeks when he faced a leadership crisis.

It was March 2012, and 300 residents of South Bend, Ind., solemnly marched to the Martin Luther King Center to protest the killing in Florida of a black teenager, Trayvon Martin.

A prominent figure at the demonstration was Darryl Boykins, South Bend’s first black police chief. Admired for teaching tennis and boxing to young people, he had been promoted to chief five years earlier after winning the respect of both black and white officers in a department that sometimes divided along racial lines.

Mr. Buttigieg addressed the protesters, but seemed not to interact with Mr. Boykins. What no one in the crowd knew was that the police top brass were in turmoil — shaken by allegations that Mr. Boykins had improperly taped phone calls of senior white officers who were said to have used racist language, including about him.

With federal prosecutors scrutinizing Mr. Boykins, the 29-year-old mayor fired the veteran police chief just before the Trayvon Martin protest. No action was taken against the officers. Precisely what they said on the tapes of their department phone calls is unknown to the public: Mr. Buttigieg has refused to release them, saying the matter is still being resolved in court.