Twitter sued the Justice Department on Tuesday, saying the agency's virtual ban of detailing the scope of US surveillance on the microblogging site is an unconstitutional "prior restraint" of speech protected by the First Amendment.

The San Francisco-based company's federal lawsuit concerns the broad limits the government has placed on Twitter over how it may characterize national security surveillance of Twitter's users—like National Security Letters and FISA court orders. The same is true for other companies, too.

Twitter attorney Eric Miller wrote: [PDF]

Twitter’s ability to respond to government statements about national security surveillance activities and to discuss the actual surveillance of Twitter users is being 24 unconstitutionally restricted by statutes that prohibit and even criminalize a service provider's disclosure of the number of national security letters (“NSLs”) and court orders issued pursuant to FISA that it has received, if any. In fact, the U.S. government has taken the position that service providers like Twitter are even prohibited from saying that they have received zero national security requests, or zero of a particular type of national security request.

The lawsuit says Twitter submitted a public transparency report to the Justice Department for approval and did not take part in a settlement with prosecutors that allowed companies to report, in ranges of 1,000, the number of secret orders they get for consumer data from US spies.

"The Defendants’ position forces Twitter either to engage in speech that has been preapproved by government officials or else to refrain from speaking altogether," Miller wrote. "Defendants provided no authority for their ability to establish the preapproved disclosure formats or to impose those speech restrictions on other service providers that were not party to the lawsuit or settlement."

Twitter said in a blog post that it had tried to avoid litigation, but was unable to convince the President Barack Obama administration "to allow us to publish even a redacted version of the report."