SAN FRANCISCO - Software titan Microsoft on Thursday sued the US government, arguing that secret warrants to search people's email violate the US Constitution.
Microsoft filed the suit against the Justice Department in federal court in Seattle, near the company's headquarters in Redmond.
"Microsoft brings this case because its customers have a right to know when the government obtains a warrant to read their emails, and because Microsoft has a right to tell them," lawyers for the company said in the court filing.
The Electronic Communications Privacy Act lets courts order Microsoft or other email service providers to remain silent about warrants for data on the overly general grounds that there is "reason to believe" tipping people off might hamper investigations, according to the suit.
That power violates constitutional protection of free speech and safeguards against unreasonable searches, Microsoft argued in the suit.
In the past 18 months, federal courts have issued nearly 2,600 secrecy orders gagging Microsoft from saying anything about warrants and other legal actions targeting customers' data, according to the filing.
"We believe that with rare exceptions consumers and businesses have a right to know when the government accesses their emails or records," Microsoft chief legal officer Brad Smith said in a blog post.
"Yet it's becoming routine for the US government to issue orders that require email providers to keep these types of legal demands secret. We believe that this goes too far and we are asking the courts to address the situation."
Internet giants have railed against secret search warrants, contending they erode trust in US technology companies while trampling on the rights of citizens and businesses.
The situation has become more urgent as computing and data storage services shift from software packages loaded onto individual computers to servers running in the Internet cloud.
"Today, individuals increasingly keep their emails and documents on remote servers in data centers - in short, in the cloud," Smith said.
"But the transition to the cloud does not alter people's expectations of privacy and should not alter the fundamental constitutional requirement that the government must - with few exceptions - give notice when it searches and seizes private information or communications."
Microsoft's legal challenge follows a high-stakes battle over FBI demands for access to an iPhone used by one of the gunmen in a December 2 rampage that left 14 dead in San Bernardino, California.
The government wanted iPhone-maker Apple to create a new tool to bypass the smartphone's security systems, but the company refused.
Although that showdown ended with investigators saying they had extracted the data from the iPhone on their own, the Justice Department rejoined the battle last week in a separate case involving someone accused of trafficking in methamphetamines.
In a filing in the US District Court in New York, the Justice Department told a federal judge it wants Apple to extract pictures, text messages and other digital data from an iPhone used by the defendant in that case.
Although the defendant has confessed and is set to be sentenced, the Justice Department wants the data to be extracted anyway for sentencing purposes, according to Apple's lawyers.
They plan to press the government in court on whether it has done everything possible to get the data without the company's help.
The US government has based its demands in both the San Bernardino case and the New York drug trafficking case on the All Writs Act - a 1789 law that gives wide latitude to law enforcement.
Earlier this year, a lower court judge in New York sided with Apple, saying law enforcement lacked the authority to compel the company to comply.
Apple argues that the government is overstepping its authority and is intent on establishing a troubling legal precedent, contending that lawmakers should decide the degree to which third parties can be compelled to work for the government.