WASHINGTON  A privacy group filed a class-action lawsuit on Thursday against the National Security Agency, President Bush and other officials, seeking to halt what it describes as illegal surveillance of Americans’ telephone and Internet traffic.

The lawsuit parallels a legal action brought against the AT&T Corporation in 2006 by the same nonprofit group, the Electronic Frontier Foundation, charging that the company gave the N.S.A. access to its communications lines and customer records without proper warrants.

Congress derailed that lawsuit this year by passing legislation granting immunity to telecommunications companies that had provided assistance to the agency, though the foundation has said it intends to challenge the constitutionality of the new law.

A lawyer with the foundation, Kevin S. Bankston, said the new suit opened a “second front” against a “massively illegal fishing expedition through AT&T’s domestic networks and databases of customer records.”