Pete Buttigieg returned to South Bend on Saturday to attend events in memory of Eric Logan, an African American man shot dead by a white police officer in the small Indiana city.

It was the Democratic presidential candidate’s first visit to the city he runs as mayor since a contentious town hall event last weekend threw a national spotlight on the shooting, Buttigieg’s record in office and his relationship with black voters.

After consulting with people close to Logan’s family, Buttigieg was not set to attend the funeral. He instead participated in a peace walk and a community event including faith leaders and police representatives.

Logan, 54, was shot dead on 16 June, after police responded to a call about someone breaking into cars. Sgt Ryan O’Neill, the officer who shot Logan, said he came at him with a knife. O’Neill had not turned on his body camera. He was placed on leave. An independent prosecutor will investigate.

Early in his term in office Buttigieg, 37, demoted South Bend’s first black police chief. In a city that is 27% black and 15% Latino, 90% of officers are white.

In Thursday night’s Democratic debate, Buttigieg was asked about his failure to bring greater diversity to South Bend police. He said he “couldn’t get it done”.

He also said he “could walk you through all of the things that we have done as a community, all of the steps that we took, from bias training to de-escalation, but it didn’t save the life of Eric Logan. And when I look into his mother’s eyes, I have to face the fact that nothing that I say will bring him back.”

The gay Afghanistan veteran and Rhodes scholar has proved to be the surprise package of the Democratic presidential primary so far, polling in the top five candidates at state and national level. The realcleapolitics.com polling average places him fifth, behind Joe Biden, Bernie Sanders, Elizabeth Warren and Kamala Harris.

Speaking to CNN on Friday, the mayor said: “These are issues that America hasn’t solved, that no city has solved, but where we’ve made progress. Sometimes it’s three steps forwards and two steps back. I’m not going to present myself as the person who is going to resolve racial tension and racial inequality in this country. That’s not the story I’m telling.

“What I am saying is that we have addressed these issues in my community. We have learned from that.”