DETROIT (WWJ/AP) – A former top lawyer for the city of Detroit who lost her job for describing a local court as “ghetto” has lost an appeal over her dismissal.

A federal appeals court said Friday that Kathleen Leavey’s comments in 2009 were not protected under the First Amendment because they were made as part of her job.

READ MORE: Chase Elliott Wins Long Race At Nashville

Leavey, who is white, has said she used the word “ghetto” in a conversation with a court employee to describe Detroit’s 36th District Court as inefficient and poor in serving the public. The chief judge, who is black, heard about the comment and contacted city hall. The angry call to a deputy mayor led to Leavey’s departure.

Talking to the National Law Journal, Leavey said she’s “not racist” and that her comment was taken out of context.

READ MORE: 2022 Ford Fireworks On June 27: Here's What To Know

According to Leavey, she told an administrator that “people regard this as a ghetto court because of the way they treat people.” She explained that she was referring to a poorly managed court. “Judges don’t get on the bench until 11 o’clock. People wait in long lines. Files get lost,” she said. “It’s just badly managed.”

The appeals court ruled that the Constitution does not shield certain expressions made during official duties.

MORE NEWS: 'Roe Is On The Ballot': Supreme Court's Ruling On Abortion Rights Raises Stakes In Midterms

(TM and © Copyright 2011 CBS Radio Inc. and its relevant subsidiaries. CBS RADIO and EYE Logo TM and Copyright 2011 CBS Broadcasting Inc. Used under license. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. The Associated Press contributed to this report.)