A Texas judge has dismissed the indictment against a black community activist and released him from pre-trial detention—almost six months after the FBI placed him in federal custody.

Civil rights activists, along with friends and family of Christopher Daniels—known to his community as Rakem Balogun—believed the FBI targeted Daniels because of his supposedly radical political beliefs and anti-law enforcement rhetoric.

Daniels’ advocates believe he was the first person to be prosecuted under a new government classification for domestic terror threats, which the FBI calls “black identity extremists.” The FBI uses the term to describe individuals who resort to violence or unlawful activities “in response to perceived racism and injustice in American society,” according to a copy of the report obtained and published last year by Foreign Policy magazine.

The classification attracted a deluge of criticism from the media, civil rights leaders, and politicians, some of whom saw in the FBI’s report a return to J. Edgar Hoover’s COINTELPRO program targeting domestic political organizations.

Activist and attorney Kamau Franklin sees the case against Daniels, who was charged with unlawful possession of a firearm, as part of an effort to criminalize black activism. “He spent six months in jail. You can’t do organizing work when you are in jail and your family is struggling around your case.”

Daniels, a founding member of both Guerilla Mainframe and the Huey P. Newton Gun Club, groups that promote weapons training, fitness, and community service among African Americans, first came under FBI scrutiny in 2015 when he appeared in videos participating in an open-carry rally against police brutality. Footage of the demonstration aired by the right-wing conspiracy website InfoWars showed demonstrators chanting “oink oink bang bang” and “the only good pig is a pig that’s dead.”

The InfoWars video drew the FBI’s attention to Daniels’ social media accounts, according to court documents, where he published what they deemed to be comments advocating for “violence toward law enforcement.” However, a special agent who testified in the case also admitted during Daniels’s detention hearing that his rhetoric produced no evidence that Daniels directed others to cause harm to a law enforcement officer, nor did it demonstrate he wanted to do so.

“For the defendant this is a good outcome, but it highlights the risk of a pretextual prosecution,” said Sarah St. Vincent, a researcher for Human Rights Watch.

Following two years of FBI surveillance, Daniels was arrested in an early-morning raid on his apartment and indicted for unlawful possession of a firearm. Daniels was not allowed to own a firearm, the government claimed, because he was convicted on a misdemeanor charge more than 10 years ago for domestic assault in Tennessee in 2007.

Mike German, a retired FBI agent and fellow at the Brennan Center for Justice’s Liberty and National Security Program, said the case against Daniels was incoherent and constituted massive overreach on the part of the government.

“ If the government can target you for selective prosecution because it doesn’t like you, then what rights remain? ” — Mike German, a retired FBI agent, fellow at the Brennan Center for Justice’s Liberty and National Security Program

“The justification for pretrial detention seems pretty specious since they knew he had a gun for two years,” said German. “Just the idea that a law enforcement agency feels it has the authority to do disruptive activities against people it can’t prove have committed serious crimes… if the government can target you for selective prosecution because it doesn’t like you, then what rights remain?”

The indictment was dismissed May 1, when a district court in Texas determined “domestic assault” as codified by Tennessee law does not fit the federal definition of domestic violence that would prohibit him from owning a firearm. Daniels was ultimately released from custody two days later.

The FBI declined to comment on the case.

Johnathan Thrower, a South Carolina community organizer who knows Daniels, said he counsels young African Americans to presume they are always being surveilled. Last September, Thrower was questioned by two FBI agents from the South Carolina Joint Terrorism Task Force.

The FBI agents asked Thrower about what they characterized as “anti-police” rhetoric he engaged in during protests against police brutality, whether he had connections to the New Black Panther Party, and a meeting he had with James Bessenger, chairman of the South Carolina Secessionist Party.

For St. Vincent, Daniels’ case demonstrates a risk that extends beyond the world of black activism. “All of us are at risk. It could be that the government as an institution is hostile to you and your beliefs… we have seen this throughout American history,” she said.

Meanwhile, Daniels says he wants to focus on rebuilding his life. Detention cost him his job and his apartment, and forced his son to change schools.

In an interview following his release from prison, Daniels said it’s important for African American activists to be on “high alert” and do everything they can to avoid giving the FBI a pretext to go after them.

As for his own case, Daniels said that while he will likely refrain from promoting his political beliefs with “offensive language,” he will not stop discussing his political views in public.

He knows, however, that he’s likely to remain under FBI surveillance.

“It really doesn’t make a difference if I change how I communicate…,” he said, “obviously I have their attention indefinitely.”