Technology firms want to be allowed to publish information about US government requests under the Fisa legislation

Microsoft and Google are to sue the US government to win the right to reveal more information about official requests for user data. The companies announced the lawsuit on Friday, escalating a legal battle over the Foreign Intelligence Surveillance Act (Fisa), the mechanism used by the National Security Agency (NSA) and other US government agencies to gather data about foreign internet users.

Microsoft's general counsel, Brad Smith, made the announcement in a corporate blog post which complained of the government's "continued unwillingness" to let it publish information about Fisa requests.

Each company filed a suit in June arguing that they should be allowed to state the details under the first amendment, which guarantees freedom of speech, and in the process defend corporate reputations battered by Edward Snowden's revelations. Critics accused the companies of collaborating in the snooping.

"On six occasions in recent weeks we agreed with the department of justice to extend the government's deadline to reply to these lawsuits. We hoped that these discussions would lead to an agreement acceptable to all," Smith wrote.

The negotiations failed, he wrote, so Google and Microsoft were going to court. He did not specify when, or to which court.

"With the failure of our recent negotiations, we will move forward with litigation in the hope that the courts will uphold our right to speak more freely. And with a growing discussion on Capitol Hill, we hope Congress will continue to press for the right of technology companies to disclose relevant information in an appropriate way."

Snowden, a former NSA whistleblower, gave documents to the Guardian and Washington Post revealing NSA claims about access to technology firms' data via its Prism system.

The companies denied the NSA had "direct access" to their systems but said they were legally unable to disclose how many times they have been asked to provide information on users.

Fisa requests are granted by a special court that sits in secret and can grant the NSA permission to collect data stored by any company about a named person. In 2012, the court granted 1,856 requests and turned none down.

"We believe we have a clear right under the US constitution to share more information with the public," said Smith's post. "The purpose of our litigation is to uphold this right so that we can disclose additional data."

He welcomed a government announcement earlier this week that it would begin publishing the total number of national security requests for customer data for the past 12 months.

"But the public deserves and the constitution guarantees more than this first step. For example, we believe it is vital to publish information that clearly shows the number of national security demands for user content, such as the text of an email."

Such figures should be published in a form that is distinct from the number of demands that capture only metadata such as subscriber information associated with a particular email address, said Smith.

"We believe it's possible to publish these figures in a manner that avoids putting security at risk. And unless this type of information is made public, any discussion of government practices and service provider obligations will remain incomplete."

The post sought to position Microsoft and Google on the moral high ground, linking them to the values of the founding fathers. "We benefit from living in a country with a constitution that guarantees the fundamental freedom to engage in free expression unless silence is required by a narrowly tailored, compelling government interest … our hope is that the courts and Congress will ensure that our constitutional safeguards prevail."