CNN  — 

The police departments of Philadelphia and St. Louis are taking action following allegations that officers posted hateful or racist content on social media. In Philadelphia, 72 officers were taken off the streets and placed on administrative duty, and in St. Louis, 22 officers have been barred from bringing their cases to the Circuit Attorney’s Office.

The social media posts were compiled by The Plain View Project, which describes itself as a “database of public Facebook posts and comments made by current and former police officers from several jurisdictions across the United States.”

St. Louis Circuit Attorney Kimberly M. Gardner put the 22 officers on her office’s exclusion list this week, her office said in a news release.

“When a police officer’s integrity is compromised in this manner, it compromises the entire criminal justice system and our overall ability to pursue justice,” Gardner said in the release. “After careful examination of the underlying bias contained in those social media posts, we have concluded that this bias would likely influence an officer’s ability to perform his or her duties in an unbiased manner.”

The office is currently not prosecuting cases where these officers serve as primary witnesses. Circuit attorney spokeswoman Susan C. Ryan said she does not know how many cases that affects.

CNN has reached out to the St. Louis Police Officers’ Association and is waiting to hear back.

Earlier this month, Philadelphia police launched an investigation into a public database of social media posts by officers that included Confederate imagery, anti-Muslim sentiments, violent rhetoric and racist comments.

As the investigation is underway, the officers have been taken off of street duty, but are still reporting to work.

An independent law firm will assist with the ongoing investigation, Philadelphia Police Commissioner Richard Ross said Wednesday at a press conference. The department plans to review each post to see if the speech is constitutionally protected by the First Amendment, he added.

“If the speech is determined to be protected, no further action will be taken,” Ross said. “An example would be an opinion on a matter of public concern that may be unpopular … but does not include threats of violence or pejorative language against any protected class.”

In addition, the Philadelphia Police Department will consult with the Anti-Defamation League and review its social media policies. The department aims to provide an update regarding disciplinary action in the next couple weeks.

Ross said that these posts are “disturbing, disappointing and upsetting.”

“They will undeniably impact police community relations … there’s no question that this puts us in the position to work even harder than we already do to cultivate relationships with neighborhoods and individual groups that we struggle to work with, even those that we have great relationships with,” Ross said.

“Our officers are entitled to due process just like any other citizen,” Philadelphia Fraternal Order of Police Lodge #5 President John McNesby said in a statement. “We will support and represent those officers during this overly-broad social-media investigation.”

“Far too many officers have been taken off the street during a time of increased violence in our city,” the statement said.

The Plain View Project combed through thousands of posts from officers in eight jurisdictions in the United States.

Some of the accounts have since been deleted, but the Plain View Project provided screenshots of the posts.

Since 2017, the group has compiled more than 5,000 posts from current and former officers, both in big cities such as Dallas and in smaller jurisdictions like Lake County, Florida.

Dave Alsup contributed to this report.