DETROIT, MI -- The city's chief financial officer has resigned after complaints that he made an insensitive joke about tense matters of race and violence.

Jim Bonsall, appointed by Emergency Manager Kevyn Orr, was accused last week of joking about whether he could “shoot someone in a hoodie" if he were to volunteer to patrol with other city officials on Angels’ Night.

After conducting an investigation, Orr announced Tuesday that he accepted Bonsall's resignation.

“Jim has decided it is best for the City and himself that he resign his post effective immediately," Orr said in a statement. "I have accepted his resignation.

Jim Bonsall, Detroit's former chief financial officer.

"Jim has made great improvements in how the city handles his cash and finance operations in the short time he has been here, but it is clear that new leadership is needed to continue to move the City of Detroit forward."

Members of City Council earlier on Tuesday had called for "swift action" regarding Bonsall.

Council member JoAnn Watson pointed out a past incident in which former top city lawyer Kathleen Leavey lost her job as corporation counsel in 2009 for referring to 36th District Court as a "ghetto court."

Leavey sued over her firing, but a federal appeals court ruled that her comment wasn't protected under the First Amendment because they were made as part of her job.

"Someone who is commenting on whether or not they have a right to shoot somebody in a hoodie, which is clearly a reference to the Trayvon Martin case, an issue that to many is fraught with racial overtones and strife and violence -- if there could be swift action based on the ghetto court comment, there should be swifter action on somebody asking can I shoot somebody in a hoodie," Watson said.

Bonsall apologized for the comment in a statement last week.

"I apologize and am sorry for having offended coworkers over comments I made during a recent meeting," he said. "Regardless of the outcome of the internal investigation or whether I keep my job as a result of it, it was never my intention to offend anyone."

City officials traditionally volunteer to join widespread Angels' Night patrols on the evening before Halloween, which during past years brought hundreds of arson fires across the city in what was known as Devil's night.

Brown said he can't compel, but is strongly encouraging Orr's appointees and consultants to join the effort.

Orr's office plans to conduct a search for a new Detroit CFO.

Bonsall had led several turnarounds in the past, including as CEO of auto supplier Peregrine.

His Linked-In page already reflected his resignation Tuesday afternoon. It indicates that he submitted his resignation on Monday.

Follow MLive Detroit reporter Khalil AlHajal on Twitter @DetroitKhalil or on Facebook at Detroit Khalil. He can be reached at kalhajal@mlive.com or 313-643-0527.