(CNN) -- The Black Lives Matter movement cannot be sued, a federal judge ruled Thursday, dismissing a case against the group and an activist brought by a police officer injured during protests after the July 2016 fatal shooting of Alton Sterling in Baton Rouge, Louisiana.
Black Lives Matter is not an entity, but a social movement, Louisiana Middle District Judge Brian A. Jackson wrote. "Therefore, all claims against 'Black Lives Matter' must be dismissed because social movements lack the capacity to be sued."
The suing Baton Rouge police officer, who remained unnamed in the lawsuit, said he was hit by concrete or rock-like objects while responding to a demonstration led by DeRay Mckesson for Black Lives Matter and had "several serious injuries," according to court documents.
Protests, vigils and memorials sprang up nationwide after the shooting of Sterling by police outside a Baton Rouge convenience store. In a graphic cellphone video that was widely shared on social media, police officers can be seen on top of the African-American man before shots were fired.
The injured officer said Mckesson and Black Lives Matter were liable for his injuries because they were negligent and should have known the protests would turn to riots and become violent.
Mckesson was exercising his constitutional right to demonstrate, the judge ruled, and he cannot be held liable for the conduct of other protesters.
"All of this highlights the need for deep, deep changes in the city of Baton Rouge." Mckesson told CNN. "It is not a new tactic that people try to use the courts to silence activists and organizers. I am happy that the judge dismissed the lawsuit and understood I had no part in the officer's injuries."
A second lawsuit, filed on behalf of another anonymous police officer who was injured in a July 17, 2016, shooting that killed three Baton Rouge officers, lists Mckesson, Black Lives Matter and others as defendants. That case is before the same judge.
Federal prosecutors said earlier this year that there isn't enough evidence to charge the two officers involved in Sterling's death.