(CNN) An Indiana police sergeant who shot and killed a black man suspected of breaking into cars has resigned from the South Bend Police Department, Chief Scott Ruszkowski told CNN on Monday.

The shooting roiled the Indiana community, drawing attention to years of racial tension between the South Bend Police Department and the city's African American residents. It has also provided a glimpse into presidential candidate Pete Buttigieg's leadership as South Bend's mayor.

Police said Ryan O'Neill shot Eric Jack Logan on June 16 while Logan was breaking into cars with a knife in his hand.

Logan's family disputes the account involving the knife. They filed a federal lawsuit in June against the city and the officer, accusing O'Neill of using excessive force and targeting Logan based on his race.

Demonstrators protest the shooting death of Eric Logan outside of the South Bend Police Station after his funeral on June 29.

"We're confident that the investigation into the shooting will determine that the action (O'Neill) took was justified based on the law and his training," said Harvey Mills, President of the South Bend Fraternal Order of Police.

However, job-related stress, the media attention and hateful social media comments have been "difficult" for O'Neill and his family, Mills said. O'Neill is also the subject of a special prosecutor investigation, a civil lawsuit and potential departmental discipline, Mills said.

"These fights are just too much for Sgt. O'Neill and his family to undertake right now," Mills said. "Resigning will allow him to focus on these challenges, as well as assist his wife with their three children, one of whom is a newborn."

Mill said that O'Neill was "forced" to defend his life from a convicted felon who was armed with an eight-inch hunting knife.

Demonstrators call for the resignation of the officer who shot Eric Logan.

Logan's family said they were surprised by O'Neill's "sudden decision" to resign, calling the timing and reasons "somewhat questionable" given the pending investigation and lawsuit.

"We don't know what motivated Mr. O'Neill to resign today but we do know and will find out very soon what actually happened that early morning on June 16, 2019."

'It's time for you to do something'

Community members had called for O'Neill's resignation, saying the lack of disciplinary action reflected the city's indifference toward the African American community.

During one demonstration, Logan's mother challenged Buttigieg, saying she's lived in South Bend her entire life and officials have not done a "thing about me or my son, or none of these people put here."

"It's time for you to do something. ... I'm tired of talking now ... and I'm tired of hearing your lies," Shirley Newbill told Buttigieg.

Buttigieg learned of O'Neill's resignation Monday night, spokesman Mark Bode said.

"Our efforts to strengthen trust between law enforcement and community members continue," Buttigieg said in a statement.

"We will await results of the independent criminal investigation, and apply any lessons learned to our work on the future of the Police Department and the community."

Buttigieg skipped campaign events so he could return to South Bend the day of the shooting. He held a news conference in which he promised the city would be transparent with the community. He also directed his police chief to order all officers to turn on their body cameras when interacting with civilians.