The U.S. Supreme Court refused to open telecommunications companies to lawsuits accusing them of violating the privacy of millions of Americans by cooperating with government wiretapping after the Sept. 11 attacks.

The justices today left intact a federal appeals court decision that said AT&T Inc., Verizon Communications Inc. and Sprint Nextel Corp. were immune from suit under a 2008 law and a decision made that year by then-President George W. Bush’s administration.

Privacy advocates sought billions of dollars in damages for what they described in their Supreme Court appeal as “a massive, unlawful program of electronic surveillance, intercepting and disclosing to the government both the communications and the communications records of millions of their customers.”

Lawsuits filed by the American Civil Liberties Union and Electronic Frontier Foundation accused the companies of violating the law and customers’ privacy through collaboration with the National Security Agency on intelligence gathering.

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

The high court rebuff doesn’t affect separate claims being pressed by some of the same plaintiffs against the government.

The companies and the Obama administration urged the Supreme Court not to take up the case. The companies told the high court that Congress “determined that it was not in the national interest for these or similar cases to proceed.”

Dozens of lawsuits were filed around the country in 2006, after Bush acknowledged the existence of a program designed to intercept terrorist communications.

The 2008 law immunized telecommunications companies if the attorney general certified that they were assisting a government investigation. Bush’s attorney general, Michael Mukasey, then made the certification, and the Justice Department asked to have the claims against the companies dismissed.

At the Supreme Court, the privacy advocates argued that the law violated constitutional separation-of-powers principles by giving the attorney general the power to decide whether the measure applies.

(The AP and Bloomberg contributed to this report.)