A federal judge ruled Thursday that Black Lives Matter was not an organization but a social movement akin to the tea party or the civil rights movement, and cannot be sued by a Louisiana police officer who was injured at a protest against police brutality last year.

The ruling by U.S. District Judge Brian A. Jackson threw out a lawsuit an officer with the Baton Rouge Police Department filed anonymously against Black Lives Matter and DeRay Mckesson, one of the movement’s leading activists.

“Although many entities have utilized the phrase ‘black lives matter’ in their titles or business designations,” the judge wrote, “’black lives matter’ itself is not an entity of any sort.”

As such, Jackson said, Black Lives Matter cannot be sued “in a similar way that a person cannot plausibly sue other social movements such as the Civil Rights movement, the LGBT rights movement, or the Tea Party movement.”

The officer, identified as John Doe in court documents, claimed in the lawsuit that he was patrolling a Black Lives Matter demonstration in Baton Rouge on July 9, 2016, when someone threw a rock at his head, injuring his teeth and jaw. Mckesson attended the rally, which was held to protest the fatal shooting of Alton Sterling, a black man, by a white police officer.

The officer argued Black Lives Matter was a “national unincorporated association” and called Mckesson its leader and co-founder. He claimed the activists had gathered in Baton Rouge to incite violence against police and that Mckesson was responsible for the actions of the unidentified demonstrator who hurled the rock.

The judge disagreed.

“Plaintiff has pleaded facts that merely demonstrate that Mckesson exercised his constitutional right to association and that he solely engaged in protected speech at the demonstration that took place in Baton Rouge on July 9, 2016,” Jackson wrote.

The judge added that the officer hadn’t cited any evidence showing that Mckesson “exceeded the bounds of protected speech.” Beyond that, Mckesson couldn’t be held liable for others’ actions, he wrote.

The judge also denied the officer’s attempt to add the hashtag #BlackLivesMatter to the suit, writing that “a hashtag is patently incapable of being sued.” Nor could the officer sue the corporation Black Lives Matter Network Inc., according to the judge.

Mckesson was among nearly 200 people who were arrested in protests sparked by Sterling’s death. He was held for 16 hours on a charge of obstructing a highway. Local prosecutors ultimately dropped charges against him and dozens of others. He has long described Black Lives Matter as a call to end violence.

“It is an expected tactic that those in power will try to use the courts to silence activists and organizers,” Mckesson, who lives in Baltimore, told The Washington Post on Thursday. “I am thankful that the judge did not allow that to happen in this case.”

Donna Grodner, an attorney for the officer, didn’t immediately respond to a message seeking comment late Thursday.

At a hearing in June, Grodner argued that Black Lives Matter had shown “a level of national organization” by holding meetings, setting up national chapters and soliciting money, as the Associated Press reported. An attorney for Mckesson responded that it was a leaderless movement with no governing body or formal membership.

In his ruling, Jackson wrote that the officer’s complaint cited no public statements from Mckesson except for a single quote the activist gave to the New York Times. Shortly after being released from jail, Mckesson told the newspaper: “The police want protesters to be too afraid to protest.”

The judge noted that the statement “does not advocate — or make any reference to — violence of any kind.” Even if it did, he said, it could still qualify as constitutionally protected speech. The officer’s claim that Mckesson allegedly “did nothing to calm the crowd” fell short as well, according to the judge.

Mckesson and Black Lives Matter are named in a separate lawsuit in the same court, filed by an officer who was wounded when a gunman opened fire on law enforcement officers in Baton Rouge last July. The gunman, Gavin Long, killed three officers and injured three others in the ambush-style attack before being fatally shot by authorities. He wrote in a suicide note that his actions were a “necessary evil” designed to retaliate against law enforcement.

The officer’s lawsuit, which is still pending, accuses Black Lives Matter, Mckesson and other prominent activists of inciting the violence. They have denied wrongdoing.

More from Morning Mix

A police officer posted a ‘Don’t drink and drive’ video. Then he was involved in a deadly crash.

For Hugh Hefner, gay rights were part of the sexual revolution

Missouri prosecutors: Brutal murder of transgender teen is not a hate crime