A federal appeals court has ruled that a law giving telecommunications companies legal immunity for helping the government with its email and telephone eavesdropping program is constitutional.

Thursday’s unanimous ruling by a three-judge panel of the 9th U.S. Circuit Court of Appeals affirmed a lower court decision regarding the 2008 law.

The appeal concerned a case that consolidated 33 different lawsuits filed against various telecom companies, including AT&T, Sprint Nextel, Verizon Communications Inc. and BellSouth Corp. on behalf of these companies’ customers.

The court noted comments made by the Senate Select Committee on Intelligence regarding the legal immunity’s role in helping the government gather intelligence.

“It emphasized that electronic intelligence gathering depends in great part on cooperation from private companies … and that if litigation were allowed to proceed against persons allegedly assisting in such activities, ‘the private sector might be unwilling to cooperate with lawful government requests in the future,'” Judge M. Margaret McKeown said.

The plaintiffs, represented by lawyers including the San Francisco-based Electronic Frontier Foundation and the American Civil Liberties Union, accuse the companies of violating the law and the privacy of its customers through collaboration with National Security Agency on intelligence gathering.

In a separate opinion on Thursday, a three-judge panel of the court revived two other lawsuits that seek redress for telecom customers whose information may have been compromised by the warrantless surveillance program.

Two groups of telecom customers sued the NSA for violating their privacy by collecting Internet data from AT&T and other major telecom companies in the surveillance program authorized by President George W. Bush.

Government lawyers have moved to stop such cases, arguing that defending the program in court would jeopardize national security and expose state secrets.

The suits will be sent back to U.S. District Court in San Francisco.

Get the latest news alerts: Follow WRAL Tech Wire at Twitter.