A special prosecutor was appointed Wednesday to investigate the fatal shooting of Eric J. Logan, an African-American man, by a white South Bend, Ind., police officer who did not have his body camera activated at the time.

Sgt. Ryan O’Neill, the police officer, had gone to investigate a 911 call about a man breaking into cars outside a South Bend apartment building on June 16. Officials said Mr. Logan was found leaning into a car, and that he raised a 6-to-8-inch knife over his head when approached by the officer.

The episode has emerged as an issue for the city’s mayor, Pete Buttigieg, who is running for the Democratic presidential nomination. The mayor said he found it “extremely frustrating” that the officer failed to activate his body camera.

Mr. Buttigieg, who left the campaign trail for several days to address the shooting, has said that he supported seeking an outside special prosecutor in the case.