A federal appeals court ruled on Thursday that journalists risk losing their privilege to shield notes and outtakes from subpoena if they fail to show editorial independence.

The decision involved director Joe Berlinger and his 2009 documentary “Crude,” which chronicled Ecuadoran residents’ class action suit against Chevron over environmental damage to a rain-forest region of the country.

Chevron had sought 600 hours of outtakes from the movie, and Berlinger has already turned over a substantial amount of footage under a previous order, but the filmmaker argued that he was protected by journalistic privilege.

The three-judge panel of the 2nd Circuit Court of Appeals said that “while freedom of speech and of the press belongs to virtually anyone who intends to publish anything (with a few narrow exceptions), all those who intend to publish do not share an equal entitlement to the press privilege from compelled disclosure.”

The appellate judges upheld U.S. District Judge Lewis Kaplan’s decision to deny Berlinger press privilege, citing facts that they say raise doubts about his independence: Steve Donziger, counsel for the Ecuadoran residents suing Chevron, solicited Berlinger to make the documentary, and Berlinger removed a scene from the final version of the project at the request of the plaintiffs’ attorneys.

“Those who gather and publish information because they have been commissioned to publish in order to serve the objectives of others who have a stake in the subject of the reporting are not acting as an independent press,” the appellate court said. “Those who do not retain independence as to what they will publish but are subservient to the objectives of others who have a stake in what will be published have either a weaker privilege or none at all.”

Chevron had sought the outtakes to help the company in its efforts to prove misconduct on the part of the plaintiff’s legal team and judicial authorities in Ecuador.

Kent Robertson, a spokesman for Chevron, said that “somewhere along the line, Joe Berlinger went from being an objective observer to an advocate. Further complicating matters, he took direction from the plaintiffs’ lawyers in editing this movie.”

He said that outtakes that Berlinger has turned over are “relevant, provocative and revealing” to their case and questioned why they were left out.

The appeals court did say, in a footnote, that “consistency of point of view does not show lack of independence,” but it called Berlinger’s claims of independence “self-serving.”

Berlinger has steadfastly maintained his independence throughout, and “Crude” even earned praise from critics, like the New York Times’ A.O. Scott, for presenting a more complex case, with Chevron’s side fairly represented.

Berlinger said by email after the ruling, “I am deeply concerned by the court’s fundamental misunderstanding of the circumstances surrounding production of this film in particular and the nature of long-term investigative reporting in general, when filmmakers embed themselves with their subjects over a long period of time to be able to tell underreported stories that serve the public interest.”

Berlinger has maintained that while Donziger pitched the idea of the movie to him and gave him access to the legal team as it pursued that case, he had complete editorial independence. He said that the decision to remove the scene, first viewed by plaintiffs’ lawyers at the Sundance Film Festival, “was exclusively my own and in no way diminishes the independence of this production from its subjects,” adding that many other suggested changes were rejected.

He added that the appeals court ruling “that a journalist must affirmatively establish editorial independence is a sea change in the law.

The standards it articulates for determining independence will unfortunately deter a great deal of important reporting by independent journalists.”