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

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.

The case stemmed from new surveillance rules passed by Congress in 2008 that included protection from legal liability for telecommunications companies that allegedly helped the U.S. spy on Americans without warrants.