Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

BATON ROUGE, La. — Black Lives Matter is a social movement, like the tea party or the civil rights movement, and therefore can't be sued, a federal judge ruled Thursday.

A police officer anonymously sued Black Lives Matter and DeRay Mckesson, a prominent activist in the movement, after being injured by a rock thrown during a protest over a deadly police shooting in Baton Rouge last year.

But U.S. District Judge Brian Jackson dismissed the officer's suit and ruled that Black Lives Matter is not an entity capable of being sued.

"Although many entities have utilized the phrase 'black lives matter' in their titles or business designations, 'Black Lives Matter' itself is not an entity of any sort," Jackson wrote in his 24-page ruling.

Black Lives Matter activist DeRay McKesson talks to the media after his release from the Baton Rouge jail in Baton Rouge, La. on Sunday, July 10, 2016. Max Becherer / AP

The judge also concluded that the officer's own claims demonstrated that Mckesson "solely engaged in protected speech" at the July 9, 2016, demonstration, which followed the fatal shooting of Alton Sterling, a black man, by a white Baton Rouge police officer.

"It's clear that I did nothing wrong that day and that the police were the only violent people in the streets," Mckesson, a Baltimore resident, said Thursday after learning of the judge's ruling. "The movement began as a call to end violence and that call remains the same today."

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

The officer's attorney, Donna Grodner, didn't immediately respond to a call and email seeking comment.

Related: Federal Judge to Decide Whether Black Lives Matter Can Be Sued

Grodner also filed a separate suit against Black Lives Matter and Mckesson on behalf of a sheriff's deputy wounded by a gunman who shot and killed three other law enforcement officers in Baton Rouge last summer. That suit, which is still pending before the same federal judge, accuses Black Lives Matter and five of its leaders of inciting violence that led to the deadly ambush.

Mckesson was one of nearly 200 protesters arrested after Sterling's shooting death. He was arrested near Baton Rouge police headquarters on a charge of obstructing a highway. The local district attorney declined to prosecute roughly 100 protesters who were arrested on that same charge, including Mckesson.

Mckesson and other protesters have since sued the city of Baton Rouge and local law enforcement officials over their arrests, accusing police of using excessive force and violating their constitutional rights.

The lawsuit dismissed Thursday didn't accuse Mckesson of throwing the rock that injured the officer's jaw and teeth, but it claimed he "incited the violence" and "was in charge of the protest," and that he was seen and heard giving orders.

During a hearing in June, Mckesson's attorney, Billy Gibbens, said Black Lives Matter doesn't have a governing body, dues-paying members or bylaws.

"This is a movement, and there isn't a person who is responsible for it, or the leader or the founder of it," he told the judge.

Grodner had argued Black Lives Matter is an "unincorporated association" that can be held liable for her client's injuries.

"It's organized. They have meetings. They solicit money. They have national chapters," Grodner said. "This shows a level of national organization."

The officer whose lawsuit was dismissed is identified only as "Officer John Doe" in the suit, saying the anonymity is "for his protection." A court filing last year cited the July 2016 sniper attack that killed five Dallas police officers and the shooting 10 days later that killed three law-enforcement officers in Baton Rouge as reasons for concealing the officer's identity.

Related: OpEd: Intersectional Allies Can Move the Social Justice Needle

Mckesson and Black Lives Matter also were named as defendants in a federal lawsuit that Larry Klayman — founder of the conservative group Freedom Watch — filed last year in Texas after the sniper attack on Dallas police officers. A judge's ruling on June 2 said the plaintiffs didn't provide the court with any support for their "proposition" that Black Lives Matter is an entity capable of being sued. All of Klayman's claims against Mckesson and Black Lives Matter have been dismissed or withdrawn.

Follow NBCBLK on Facebook, Twitter and Instagram