The lawsuit, which Twitter said follows months of fruitless negotiations with the government, marks an escalation in the Internet industry's battle over government gag orders on the nature and number of requests for private user information.
In the lawsuit, filed in U.S. District Court for Northern California, Twitter said that current rules prevent it from even stating that it has not received any national security requests for user information.
The messaging service said such restrictions violate the Constitution's First Amendment guarantee of free speech.
"This is an important issue for anyone who believes in a strong First Amendment, and we hope to be able to share our complete transparency report," Twitter said in a blogpost.
Tech companies have sought to clarify their relationships with U.S. law enforcement and spying agencies in the wake of revelations by former National Security Agency contractor Edward Snowden that outlined the depth of U.S. spying capabilities.
Twitter's lawsuit follows an agreement between Internet companies like Google Inc and Microsoft Corp with the government about court orders they receive related to surveillance.
(Also see: Google Reveals Rising Government Requests in New Transparency Report)
The agreement freed the companies to disclose the number of orders they received, but only in broad ranges. A company that offers email services, for example, would be able to say it received between zero and 999 orders from the Foreign Intelligence Surveillance Court during a six-month period for email content belonging to someone outside the United States.
In a separate case, a federal appeals court in San Francisco on Wednesday will hear arguments on whether the FBI can gag recipients of national security letters. A lower court judge had ruled those secrecy guidelines unconstitutional.
Can't even disclose zero requests
Twitter, which allows its 271 million monthly users to send 140-character text messages, has traditionally taken an aggressive posture challenging government censorship requests and has previously described itself as "the free-speech wing of the free-speech party."
The American Civil Liberties Union praised Twitter's action, saying in a statement that the company was doing the right thing by "challenging this tangled web of secrecy rules and gag orders."
"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," Twitter said in its complaint.
The Justice Department responded to the lawsuit with a statement on how it has worked with other companies.
"Earlier this year, the government addressed similar concerns raised in a lawsuit brought by several major tech companies," Justice Department spokeswoman Emily Pierce said. "There, the parties worked collaboratively to allow tech companies to provide broad information on government requests while also protecting national security."
The Electronic Frontier Foundation, a nonprofit group that defends civil liberties in the digital world, said it had been disappointed that tech companies had given up their fight.
"EFF and a number of privacy and free-speech organizations expressed our profound disappointment that the companies dropped their lawsuit for so little," Nate Cardozo, staff attorney with the group, said on Tuesday.
The government's restrictions on providing more details about requests for user data, he said, are "useful for one thing, which is to keep the public in the dark about what authorities the government uses to get our data.
Twitter's lawsuit said the company has discussed the matter with the government for months. In a meeting with officials from the DOJ and the FBI in January, Twitter argued that it should not be bound by the disclosure limits that the government offered to Google and the other companies.
It said it submitted a draft transparency report with more detailed data to the FBI in April, but the agency denied Twitter's request to publish the draft five months later.
"We've tried to achieve the level of transparency our users deserve without litigation, but to no avail," Twitter said in Tuesday's blogpost. It said it was "asking the court to declare these restrictions on our ability to speak about government surveillance as unconstitutional under the First Amendment."
© Thomson Reuters 2014
For the latest tech news and reviews, follow Gadgets 360 on X, Facebook, WhatsApp, Threads and Google News. For the latest videos on gadgets and tech, subscribe to our YouTube channel. If you want to know everything about top influencers, follow our in-house Who'sThat360 on Instagram and YouTube.