Twitter will not be able to reveal surveillance requests it received from the United States government after a federal judge accepted government arguments that this was likely to harm national security after a nearly six-year-long legal battle.

In 2014, the social media company sued the US Department of Justice to be allowed to reveal, as part of its Draft Transparency Report, the surveillance requests it received. It argued its free-speech rights were being violated by not being allowed to reveal the details.

More:

US District Judge Yvonne Gonzalez Rogers granted the government's request to dismiss Twitter's lawsuit in an eleven-page order filed in the US District Court for Northern California. The judge ruled on Friday that granting Twitter's request "would be likely to lead to grave or imminent harm to the national security".

Twitter's lawsuit followed months of fruitless negotiations with the government and marked an escalation in the internet industry's battle over government gag orders on the nature and number of requests for private user information.

Tech companies were seeking to clarify their relationships with US law enforcement and spy agencies in the wake of revelations by former National Security Agency contractor Edward Snowden that outlined the depth of US spying capabilities.