DES MOINES, Iowa — An Iowa crime lab analyst fired after writing on Facebook that she feared and despised black people has to pay back $3,840 in unemployment benefits, a judge has ruled.

Former Division of Criminal Investigation criminalist Amy Pollpeter should have been ineligible for unemployment insurance because her Facebook post was work-related misconduct, administrative law judge Stephanie Callahan ruled this month.

The Iowa Department of Public Safety fired Pollpeter in July after she blasted the Black Lives Matter movement and African-Americans in general on her publicly accessible Facebook page. She had worked at the state crime lab for 11 years and was responsible for collecting and processing evidence from crime scenes, often testifying for the prosecution at trials.

In a July 8 post prompted by the killings of police officers in Dallas by a black gunman, Pollpeter wrote that African-Americans have brought hatred upon themselves by “rioting, looting stores, and shooting cops” and by demanding “special rights.”

“BECAUSE OF BLACKS — I now do notice the color of skin — and frankly, I no longer feel safe around them,” Pollpeter wrote. “BLACKS have effectively created a MORE RACIST environment rather than working to be equal … So yes, if I’m on a sidewalk and you are black, I will now move to the other side of the street and will be watching for whether you have a gun.”

The department learned of the post from employees and launched an investigation. Pollpeter was fired after her superiors concluded the post violated state policies on social media use and conduct and demonstrated a bias against African-Americans that would damage her credibility.

Pollpeter filed for unemployment benefits, collecting $3,840 over a nine-week period that ended Oct. 1. The department argued she should have been ineligible under rules that disqualify workers fired for job-related misconduct.

Pollpeter argued that she believed she was acting within department guidelines and that her post only objected to Black Lives Matter. She also argued the post wasn’t work-related because other departments use the “DCI” acronym that was in her post.

Callahan called those arguments unpersuasive, noting that Pollpeter controlled evidence in crimes involving African-American victims and perpetrators. Pollpeter should have known that making public statements suggesting she had a racial bias would be harmful to her job performance and her employer’s image, Callahan wrote.