Americans have a constitutional right to film on-duty police officers in public, a federal appeals court in Philadelphia ruled Friday. The three-judge panel’s decision is not the first of its kind, but it marks a significant milestone: Half of U.S. states are now covered by rulings protecting the videotaping of law enforcement.

In its decision in Fields v. City of Philadelphia, the Third Circuit Court of Appeals panel said the First Amendment’s protections extended to two people who used their smartphones to record police interactions with a third party.

“We ask much of our police. They can be our shelter from the storm,” Judge Thomas Ambro wrote for the majority. “Yet officers are public officials carrying out public functions, and the First Amendment requires them to bear bystanders recording their actions. This is vital to promote the access that fosters free discussion of governmental actions, especially when that discussion benefits not only citizens but the officers themselves.”

The judges’ decision solidifies a growing consensus among the federal appeals courts on this nascent issue. The First, Fifth, Seventh, Ninth, and Eleventh Circuits have also issued similar rulings, starting in 2011, to protect bystanders who record police actions. Their collective jurisdictions now amount to exactly half of U.S. states and roughly 60 percent of the American population. No federal appeals court has ruled to the contrary; the Supreme Court has not weighed in on the subject.

The matter of whether citizens have a right to record police has grown in importance in recent years, as video clips of police encounters with unarmed black men and women circulate rapidly on social media, growing more high-profile with each share. That footage helped spark the Black Lives Matter movement and a national debate over police reform and technology’s role in it. As my colleague Robinson Meyer noted in 2015, citizens who record incidents of police misconduct can be fulfilling a civic duty, of sorts, by exposing official wrongdoing.

The two plaintiffs in Philadelphia, Richard Fields and Amanda Geraci, brought the lawsuits that led to the Third Circuit’s ruling after separate incidents. Geraci, a member of a local police-watchdog group, was filming officers arresting a protester during an anti-fracking demonstration in the city in 2012 when one of them “abruptly pushed” her against a pillar to obstruct her from recording the arrest. The following year, Fields used his iPhone to film police breaking up a house party across the street. An officer arrested Fields, then a Temple University sophomore, and searched his phone for the videos; Geraci was not arrested. They filed lawsuits against the city of Philadelphia under federal civil-rights laws shortly thereafter.

In response, the city asked the federal district court for summary judgment in its favor. Philadelphia did not argue against Fields and Geraci’s joint claim they had a First Amendment right to film police officers, which had by then been validated by at least one circuit court elsewhere in the country. Indeed, the police department had instructed its officers multiple times that such a right existed prior to the interactions with both plaintiffs. Instead the city argued its officers were protected by qualified immunity, a legal doctrine that shields government officials from liability unless they violate a “clearly established” constitutional right.

The district court nonetheless rejected the plaintiffs’ First Amendment argument, citing the lack of existing precedent from the Third Circuit or the U.S. Supreme Court. The judge noted that neither Fields nor Geraci testified they had an intent to publish or distribute the footage when they took it. Accordingly, the court said, “we decline to create a new First Amendment right for citizens to photograph officers when they have no expressive purpose such as challenging police actions.”

Fields and Geraci appealed that ruling to the Third Circuit, which rejected the lower court’s reasoning. “This case is not about whether Plaintiffs expressed themselves through conduct,” Ambro wrote. “It is whether they have a First Amendment right of access to information about how our public servants operate in public.

“Bystander videos provide different perspectives than police and dashboard cameras, portraying circumstances and surroundings that police videos often do not capture,” he continued. “Civilian video also fills the gaps created when police choose not to record video or withhold their footage from the public.” In addition to a video’s journalistic value, Ambro also cited its occasional utility for law-enforcement purposes, ranging from Justice Department investigations of civil-rights violations to exonerations of police officers accused of wrongdoing.

Despite the broader victory on First Amendment grounds, the panel handed Fields and Geraci a major defeat on the lawsuit itself. Two of the three judges agreed with the city that qualified immunity applied for the officers in both situations, effectively shielding them from legal liability for the incidents. That drew a partial dissent from Judge Richard Nygaard, who agreed with his colleagues on the First Amendment question but parted ways on the qualified-immunity ruling.

Nygaard noted that the Philadelphia Police Department had taken multiple steps to inform its officers of citizens’ right to record them, including a department-wide memo in 2011 and a more detailed departmental directive in 2012. To underscore the order’s importance, the department even required sergeants to read it aloud at roll call and for each officer to read and sign a copy of it.

“Although the directives declared a First Amendment right well ahead of this court, the Philadelphia Police Department Commissioner had a desire to ‘get out ahead’ of what he presciently viewed as an inevitable ruling,” Nygaard wrote. “With all of this, it is indisputable that all officers in the Philadelphia Police Department were put on actual notice that they were required to uphold the First Amendment right to make recordings of police activity.”

Ambro, for his part, stuck closely with the existing precedents surrounding qualified immunity. Previous cases required “robust consensus” on the existence of such a right to deny qualified immunity, he wrote, and the consensus on the right to record did not exist at the time of the incidents. As a result, he concluded the panel “cannot say that the state of the law at the time of our cases (2012 and 2013) gave fair warning” to the officers that “recording public police activity was constitutionally protected.” That’s a significant victory for the officers involved—but a “fair warning” to any who would obstruct the right to record in the months and years to come.