The Electronic Frontier Foundation filed a class-action lawsuit against AT&T on Tuesday, accusing the telecom company of violating federal laws by collaborating with the government's secret, warrantless wiretapping of American citizens' phone and internet usage.

The suit, filed by the civil liberties group in federal court in San Francisco, alleges AT&T secretly gave the National Security Agency access to two massive databases that included both the contents of its subscribers' communications and detailed transaction records, such as numbers dialed and internet addresses visited.

"Our goal is to go after the people who are making the government's illegal surveillance possible," says EFF attorney Kevin Bankston. "They could not do what they are doing without the help of companies like AT&T. We want to make it clear to AT&T that it is not in their legal or economic interests to violate the law whenever the president asks them to."

One of AT&T's databases, known as "Hawkeye," contains 312 terabytes of data detailing nearly every telephone communication on AT&T's domestic network since 2001, according to the complaint. The suit also alleges that AT&T allowed the NSA to use the company's powerful Daytona database-management software to quickly search this and other communication databases.

That action violates the First and Fourth amendments to the Constitution, federal wiretapping statutes, telecommunications laws and the Electronic Communications Privacy Act, according to the complaint.

The suit, which relies on reporting from the Los Angeles Times, seeks up to $22,000 in damages for each AT&T customer, plus punitive fines.

AT&T did not immediately respond to a request for comment.

The lawsuit comes a little more than a month after The New York Times reported that in 2001, President Bush ordered the NSA to begin warrantless monitoring of Americans' overseas phone calls and internet usage.

The administration defends the eavesdropping program, saying it is only targeting communications to and from suspected terrorists, that government lawyers review the program every 45 days and that Congress authorized the president to track down 9/11 co-conspirators, thereby giving the president the ability to bypass wiretapping laws.

Some Senate Democrats and Republicans, along with civil libertarians and former government officials, counter that the wiretaps are simply illegal and that wiretapping warrants can be acquired easily if the government has probable cause to believe an American is affiliated with terrorists.

The government is not named in the lawsuit, though it is already being sued by the American Civil Liberties Union over the surveillance program.

Bankston estimates that millions of people nationwide would be eligible to join the class action, pushing the possible total fines into the billions. However, he expects the administration will try to kill the lawsuit by invoking the rarely used state secrets privilege.

"If state secrecy can prevent us from preserving the rights of millions upon millions of people, then there is a profound problem with the law," says Bankston.