The judges disagreed. That left Yahoo with two choices: Hand over the data or break the law.
So Yahoo became part of the National Security Agency's secret Internet surveillance program, PRISM, according to leaked NSA documents, as did seven other Internet companies.
Like almost all the actions of the secret court, which operates under the Foreign Intelligence Surveillance Act, the details of the disagreement with Yahoo were never made public beyond a heavily redacted court order, one of the few public documents to emerge from the court. The name of the company had not been revealed until now. Yahoo's involvement was confirmed by two people with knowledge of the proceedings. Yahoo declined to comment.
But the decision has had lasting repercussions for the dozens of companies that store troves of their users' personal information and receive these national security requests - it puts them on notice that they need not even try to test their legality. And despite the murky details, the case offers a glimpse of the push and pull among tech companies and the intelligence and law enforcement agencies that try to tap into the reams of personal data stored on their servers.
It also highlights a paradox of Silicon Valley: While tech companies eagerly vacuum up user data to track their users and sell ever more targeted ads, many also have a libertarian streak and resist sharing that data with the government.
"Even though they have an awful reputation on consumer privacy issues, when it comes to government privacy, they generally tend to put their users first," said Christopher Soghoian, a senior policy analyst studying technological surveillance at the American Civil Liberties Union. "There's this libertarian, pro-civil liberties vein that runs through the tech companies."
Lawyers who handle national security requests for tech companies say they rarely fight in court but frequently push back privately by negotiating with the government, even if they ultimately have to comply. In addition to Yahoo, which fought disclosures under FISA, others, including Google, Twitter, smaller communications providers and a group of librarians, have fought in court elements of National Security Letters, which the FBI uses to secretly collect information about Americans. Last year, the government issued more than 1,850 FISA requests and 15,000 National Security Letters.
"The tech companies try to pick their battles," said Stephen I. Vladeck, a law professor at American University who has challenged government counterterrorism surveillance. "Behind the scenes, different tech companies show different degrees of cooperativeness or pugnaciousness."
Vladeck added, however, that even if a company resisted, "that may not be enough, because any pushback is secret and, at the end of the day, even the most well-intentioned companies are not going to be standing in the shoes of their customers."
FISA requests can be as broad as seeking court approval to ask a company to turn over information about the online activities of people in a certain country. Between 2008 and 2012, only two of 8,591 applications were rejected, according to data gathered by the Electronic Privacy Information Center, a nonprofit research center in Washington. Without obtaining court approval, intelligence agents can then add more specific requests - like names of individuals and additional Internet services to track - every day for a year.
National Security Letters are limited to the name, address, length of service and toll billing records of a service's subscribers.
Because national security requests ban recipients from acknowledging their existence, it is difficult to know how, and how often, the companies cooperate or resist. Small companies are more likely to take the government to court, lawyers said, because they have fewer government relationships and customers, and fewer disincentives to rock the boat. One of the few known challenges to a National Security Letter, for instance, came from a small Internet provider in New York, the Calyx Internet Access Corp.
The Yahoo ruling, from 2008, shows that the company argued that the order violated its users' Fourth Amendment rights against unreasonable searches and seizures. The court called that worry "overblown."
"Notwithstanding the parade of horribles trotted out by the petitioner, it has presented no evidence of any actual harm, any egregious risk of error, or any broad potential for abuse," the court said, adding that the government's "efforts to protect national security should not be frustrated by the courts."
One of the most notable challenges to a National Security Letter came from an unidentified electronic communications service provider in San Francisco. In 2011, the company was presented with a letter from the FBI, asking for account information of a subscriber for an investigation into "international terrorism or clandestine intelligence activities."
The company went to court. In March, U.S. District Court Judge Susan Illston ruled the information request, along with the gag order, unconstitutional. The case is under appeal, which is why the company cannot be named.
Google filed a challenge this year against 19 National Security Letters, and in May, Illston ruled against the company. Google was not identified in the case, but its involvement was confirmed by a person briefed on the case.
In 2011, Twitter successfully challenged a silence order on a National Security Letter related to WikiLeaks members.
Other companies are asking for permission to talk about national security requests. Google negotiated with Justice officials to publish the number of letters they received and were allowed to say they had each received between zero and 999 last year, as did Microsoft. The companies, along with Facebook and Twitter, said Tuesday that the government should give them more freedom to disclose national security requests.
The companies comply with a vast majority of nonsecret requests, including subpoenas and search warrants, by providing at least some of the data.
Even though the FISA court requires so-called minimization procedures to limit incidental eavesdropping on people not in the original order, including Americans, the scale of electronic communication is so vast that such information - say, on an email string - is often picked up, lawyers say.
Last year, the FISA court said the minimization rules were unconstitutional and Wednesday ruled that it had no objection to sharing that opinion publicly. It is now up to a federal court.
© 2013, The New York Times News Service
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.