LOS ANGELES (CBSLA.com) — A top LA County Sheriff’s Department official resigned Sunday in the wake of a controversy over emails he forwarded to people from his work computer.

Tom Angel, who until Sunday was chief of staff for Sheriff Jim McDonnell, forwarded the emails three to four years ago while he was working as second-in-command at the Burbank Police Department.

The emails were recently uncovered in an LA Times report and Angel faced public backlash over their offensive takes on minorities. It’s just the latest embarrassment for the sheriff’s department, and the first under McDonnell’s watch.

One message reads:

“I took my biology exam last Friday. I was asked to name two things commonly found in cells. Apparently ‘Blacks’ and ‘Mexicans’ were NOT the correct answers.”

Another message makes fun of Muslims who are worried about profiling and belittles the religion’s rituals.

“It’s despicable because I can’t believe that a person of such authority can use government services – using a government Listserv to circulate such trash against all minorities,” says Salam Al-Marayati, president of the Muslim Public Affairs Council.

McDonnell said in a statement Sunday that he had accepted Angel’s resignation.

“Very recently I learned that three to four years ago LASD Chief Tom Angel shared inappropriate and unprofessional e-mails with others, during his service as Burbank Police Department Assistant Chief,” McDonnell said in a statement. “This incident is one that I find deeply troubling. Chief Angel has offered his resignation, and I have accepted it. I thank him for his many years of service, and wish him and his family well.”

“Despite the Sheriff’s Department’s many recent efforts to fortify public trust and enhance internal and external accountability and transparency, this incident reminds us that we and other law enforcement agencies still have work to do. I intend to turn this situation into a learning opportunity for all LASD personnel,” the statement continued.

He said the department will also be assessing “existing policies and systems to ensure “accountability and enhancing cultural and ethnic sensitivity and professionalism among our personnel.”

For example, the Sheriff’s Department will be implementing a new system of random audits of the e-mail accounts of department personnel.

“The law enforcement profession must and can demand the highest standards of professionalism, fairness and constitutional policing individually and collectively from its personnel,” McConnell said. “We are only as effective as the relationships, credibility and trust we have with our community; this is a fundamental point that I and LASD personnel take very seriously.”

On February 10, former Sheriff Lee Baca pleaded guilty to lying to federal Justice Department officials investigating jail abuse, he awaits sentencing.

On April 6, former Undersheriff Paul Tanaka was convicted of conspiracy and obstruction of justice for similar crimes.

(©2016 CBS Local Media, a division of CBS Radio Inc. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. Wire services contributed to this report.)