A panel of federal judges ruled Wednesday that New York City can keep secret about 1,800 pages of records detailing the Police Department's surveillance and tactical strategy in advance of protests at the 2004 Republican National Convention.
In reversing a lower court decision, the three-judge panel of the United States Court of Appeals for the Second Circuit sided with the department's position that releasing the documents could compromise future surveillance efforts, including those centered on terrorism suspects.
Releasing the documents "could undermine the safety of law enforcement personnel and would likely undermine the ability of a law enforcement agency to conduct future investigations," according to the 43-page decision, written by Judge José A. Cabranes, whom President Bill Clinton appointed. He was joined in the ruling by Judges Debra A. Livingston and Richard C. Wesley, both appointees of President George W. Bush.
The ruling appears to end a battle over the documents that lasted more than three years and comes amid a case that represents the largest legal challenge to the powers extended to the police since the Sept. 11 attack. Initially, the issue was full disclosure of evidence amid depositions in federal lawsuits brought by the New York Civil Liberties Union against the city.
The intelligence documents and filings sought by the group detailed the work of undercover officers sent all over the world by the Police Department to collect information on people who planned to demonstrate at the 2004 convention.
Police Commissioner Raymond W. Kelly said the court had "wisely recognized the fundamental importance to public safety of protecting undercover identities and maintaining the integrity of their methods."
"This was an important decision," Mr. Kelly added, "for New York and for the protection of society at large."
More than 1,800 people were arrested and fingerprinted during the convention, but lawyers for the civil liberties group, representing some of those arrested, were seeking the documents to see how and why arrests were made and what information the police may have had before they made the arrests.
In recent years, the city has paid millions of dollars to many of those who sued after their arrests, asserting that they had been improperly taken into custody. Many were herded into pens at a West Side pier in Manhattan that was dubbed Guantánamo on the Hudson.
Last year, a Federal District Court judge rejected the city's efforts to avoid disclosing the documents, which include hundreds of field intelligence reports by undercover investigators who infiltrated and compiled data on protest groups. That order affirmed a ruling by a federal magistrate judge, James C. Francis IV.
Under Judge Francis' ruling, the city would have been allowed to redact the names of undercover officers and confidential informants, and to remove specific information about surveillance techniques.
But the appeals court on Wednesday said the lower court had made errors in its assessment, in part because the plaintiffs had not shown a "compelling need" to have the documents; the judges said that "end user reports" - information on potential activists culled from the Internet - were similar to the field reports prepared by the police.
"We conclude that the district court's order - directing a department of the executive branch of the City of New York to disclose information that could risk the safety of its employees and the public - was a clear abuse of discretion," the ruling said.
Civil liberties lawyers wanted to rebut claims by the police that its surveillance operations provided a legal basis for arresting and detaining people, instead of issuing them summonses. Those placed under surveillance included church groups, street theater companies and environmentalists.
Christopher T. Dunn, the associate legal director of the New York Civil Liberties Union, said it was a mistake to conflate the department's antiterrorism efforts with its operation to covertly observe groups involved in public protests at political events.
Mr. Dunn said he was concerned that the police would use the decision to clamp down on peaceful protests in New York.
"What has been so deeply troubling has been the city's continued effort to depict demonstrators as terrorists," Mr. Dunn said. "The convention protests were entirely peaceful, and we believe that the reports we sought would have revealed that the Police Department was fully aware that the protests would be peaceful."
Mr. Dunn added, "The real tragedy in today's ruling is that it may further embolden the police to play the terrorism card in trying to suppress lawful protest."
The ruling on Wednesday decided the issue that erupted unexpectedly in 2007 in connection with two federal suits brought by the civil liberties group against the city. In its two cases, the group is challenging mass arrests, detentions that lasted for days and the fingerprinting of protestors and bystanders. The suits, which have been joined by others challenging the police tactics, seek - in addition to unspecified damages - to have those actions declared unlawful.
The suits will now go to trial, Mr. Dunn said, adding that an appeal was unlikely because "the ruling does not undermine our case in any way."
As it turned out, most of the 1,800 people arrested on Aug. 31, 2004, the second day of the convention, faced noncriminal violations, most of which were later dismissed. Now that the 1,800 pages of undercover documents are out of play, the cases will hinge in part on 600 pages of the end user reports, Mr. Dunn said.