Civil liberties advocates have reacted angrily to a legal ruling that puts restrictions on citizens filming the police.

According to The Huffington Post, U.S. District Judge Mark Kearney ruled in January that citizens were not protected by the First Amendment from filming the police, unless they were doing so to criticize law enforcement.

“We have not found, and the experienced counsel have not cited, any case in the Supreme Court or this [Third Circuit] finding citizens have a First Amendment right to record police conduct without any stated purpose of being critical of the government,” said Kearney.

Kearney made the ruling in a case involving Richard Fields and Amanda Geraci, two Philadelphia residents, when police seized their cameras after they recorded officers.

According to Kearney’s ruling, Fields and Geraci should not expect to be protected under the First Amendment since they filmed officers “because it was an interesting scene.”

Mary Catherine Roper, an attorney with the ACLU of Pennsylvania who represented Fields and Geraci, told Huff Post, Kearney’s ruling goes against a Philadelphia law that allows the filming of police. However, police frequently disregard that law.

“The reason we have these types of lawsuits in the first place is because police violate that policy,” Roper said. “The most important point of the First Amendment is to ensure that we can criticize our government.”

Roper added she expected Kearney’s ruling to be overturned in appellate court.

UCLA law professor Eugene Volokh condemned Kearney’s ruling in a Washington Post article. He said the ruling goes against previous decisions made by higher courts.

“Some restrictions on such recording may be constitutional, but simply prohibiting the recording because the person is recording the police can’t be constitutional,” said Volokh, who specializes in free speech issues. “This is the view of all the precedential federal appellate decisions that have considered the issue.”

Paul Hetznecker, a civil rights attorney representing a photographer who was detained for filming officers at a protest, said Kearney’s ruling stops journalist from doing their jobs.

“Gathering information for dissemination is a fundamental part of what we do under the First Amendment, and videotaping a police officer conducting their duties in a public space is a fundamental example of gathering information,” he said in an interview with The Philadelphia Inquirer.