South Bend, Indiana (CNN) Presidential candidate Pete Buttigieg faced the raw and unvarnished emotion of his community at a town hall in South Bend, Indiana, on Sunday as the mayor attempted to soothe the pain caused by the recent killing of a black man by a police officer .

The shooting of Eric Jack Logan, who police alleged was breaking into cars and wielding a knife when he was shot by officer Ryan O'Neill last Sunday, has roiled the Indiana community, putting the spotlight on years of racial tension between the South Bend Police Department and the city's African American residents.

Buttigieg, who announced his presidential campaign earlier this year and quickly surged in the polls, largely put his campaign on hold this week, traveling back and forth to South Bend as he canceled multiple events across the country while keeping some engagements in Massachusetts, Florida and South Carolina. And the town hall represented the biggest public test Buttigieg has faced since declaring his quest for the White House.

The free-wheeling town hall -- which included a mix of questions, storytelling and protesting from attendees who spoke to the mayor -- focused on how the police department has interacted with the community for years, long before the shooting.

Buttigieg kept his emotions in check, something that has become a trademark of the candidate on the campaign trail but did let out a mix of frustration at being interrupted and visible sadness at the fact that these issues plague the city he has led for eight years.

The mayor, sitting on stage with South Bend Police Chief Scott Ruszkowski , responded to the heated questions and direct criticism by admitting failure on a number of fronts, including efforts to diversify the South Bend Police Department and the fact that the body camera technology -- that he heralded when it was implemented -- did not to capture anything from the officer-involved shooting.

"The effort to recruit more minority officers to the department and the effort to introduce body cameras have not succeeded and I accept responsibility for that," Buttigieg said. "We have tried but not succeeded to increase diversity in the police department and we need help."

Under Buttigieg, the South Bend Police Department has slowly -- but consistently - become less diverse. The department had 26 African American officers in 2014, according to news reports at the time, meaning a little more than 10% of the 253-officer department was black. There are now 13 black officers in the force, according to numbers released by the department, leaving the department 88% white and just over 5% black.

When asked directly about whether the company who made the body cameras could be to blame for their failure, Buttigieg said the responsibility fell on him.

"It could be any of those things: A failure of an individual, a failure of the policy, a failure of the technology. We will find out," he said. "But if anybody is trying to figure out who to hold responsible, the administration bought the technology, hired the officer and wrote the policy. So, at the end of the day, I'm responsible."

Audience members asked the mayor to remove "racist" officers from the streets, ensure that the body cameras he implemented actually work and release the findings of the investigation into the shooting of Logan.

While Buttigieg attempted to distance the town hall from his presidential campaign, telling reporters after the event that the politics of his response has not been something he considered, it was on the minds of those in the audience.

"You got to get back to South Carolina like you were yesterday," a man yelled at Buttigieg during the event, a nod to the fact that the mayor, after canceling events in South Carolina on Friday, traveled to the early nominating state on Saturday to speak at the state Democratic Party's convention.

Asked after Sunday's contentious town hall if Buttigieg's busy campaign schedule was taking his attention away from his responsibilities as mayor, South Bend NAACP Chapter President Michael Patton disagreed, telling CNN's Ana Cabrera, "Our mayor has been present and visible in our community."

"And so I don't believe his campaigning has been neglect. He returned to our community as soon as he got wind of the shooting on Sunday," Pastor Patton said. "He was back here, with boots on the ground, ready to address this situation, and so we're appreciative that he paid attention and, as well, found himself back here in the community."

Some audience members shouted "Fire Knepper," an officer who has a long history of excessive force allegations against him to the point that community members have long called for him to be ousted from his position.

Regina Williams-Preston, a member of the so-called South Bend Common Council, the city's version of a city council, faulted the mayor for meeting with only certain black leaders in South Bend, urging him to "rethink who the leaders are in the black community."

"I welcome the spirit of that suggestion," Buttigieg responded. "I am always trying to get more voices heard. I don't want to sound defensive but we have taken a lot of steps, they clearly have not been enough but I cannot accept the suggestion we have done nothing."

The mayor went on to say that he had invited some of the activists in the room to his office to talk about these issues and they have "decided not to join."

"That seat at the table, I want people to know that seat at the table is waiting for you and I would welcome more input from you about how I can do a better job," he concluded.

Buttigieg opened the event by announcing that he will send a letter to the Department of Justice Civil Rights Division saying he supports an investigation into the officer-involved shooting, something that activists have demanded. And the mayor announced that he has asked the St. Joseph County Metro Homicide Department to appoint an "an independent investigator... to takeover" the inquiry.

Speaking with reporters after the town hall, a visibly emotional Buttigieg said that he hopes people see that "our city is facing this" and "not running away."

"Maybe the level of attention on this will help us do some good," Buttigieg said. "Because everybody has got to be a part of it. There is just no running away from it, not for me."

Buttigieg reiterated the importance of solving the problems at hand, not just for South Bend, but for the larger US.

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