A federal appeals court has ruled that Baltimore State’s Attorney Marilyn Mosby cannot be sued for her comments and actions following the death of Freddie Gray Jr., whose death while in the custody of city police led to public demonstrations, riots and officer prosecutions.

A three-judge panel of the U.S. Court of Appeals for the Fourth Circuit ruled on Monday that Mosby was protected by absolute prosecutorial immunity, even though the officers charged in connection with Gray’s death ultimately weren’t convicted.