A federal judge is allowing key parts of a lawsuit filed against Baltimore State’s Attorney, Marilyn Mosby, brought forth by five of the six police officers charged in the death of Freddie Gray to move forward.

The Baltimore Sun reports that U.S. District Judge Marvin J. Garbis ruled that claims against Mosby and Assistant Sheriff Samuel Cogen are permissible for advancement.

The claims filed by the officers include malicious prosecution, defamation and invasion of privacy. Previously, attorneys representing Mosby said she had absolute prosecutorial immunity from actions taken as a state’s attorney. But Judge Garbis noted that her office conducted an independent investigation.

“Plaintiffs’ malicious prosecution claims relate to her actions when functioning as an investigator and not as a prosecutor,” Garbis wrote.

Judge Garbis dismissed the counts of false arrest, false imprisonment and abuse of process against Mosby. Claims against the state were also dismissed.

Mosby is being represented by the Maryland attorney general’s office, which declined to comment on the 65-page ruling. Late last year, all charged were dismissed against three of the officers charged in the April 2015 death of Gray. Prosecutors dropped all remaining charges against the remaining three officers on July.

The 25-year-old Black man suffered a severed spine while in the officers’ custody and died a week later. Mosby charged the six officers with criminal counts, including manslaughter and second-degree murder. The charges alleged the arresting officers had no grounds to detain Gray, and that they ignored department rules while transporting him.

Officers Garrett Miller, Edward Nero, and William Porter, Sgt. Alicia White and Lt. Brian Rice have sued Mosby and Cogen. They allege the two knowingly brought forth false charges, an allegation that both Mosby and Cogen deny.

The plaintiffs are arguing that prosecutors overlooked key facts in the case when pushing criminal charges forward. They contend that prosecutors omitted the city code when charging that the knife Gray was arrested for possessing was illegal under state law.

Garbis said he was “not definitively deciding” that Mosby and Cogen would not still enjoy immunity. “Rather the court is determining that the existence of this affirmative defense is not clear on the face of the complaint and a firm conclusion on the reasonableness of the probable cause determination requires greater factual development,” he wrote.

Attorneys representing Cogen said last fall that he did not have firsthand knowledge of the evidence in the case, and only looked at what was presented to him by Mosby’s office. Attorneys for Mosby say the material that ended up in the charging documents was Cogen’s responsibility.