National Security Agency (NSA) surveillance slides
Logo belonging to the Information Awareness Office, a U.S. government department focused on applying technology to track suspected terrorists abroad. Wikicommons

Yahoo executives upset with a 2007 government order to provide information to the U.S. National Security Agency were given a sobering choice: Either hand it over or face a $250,000 fine for each day you refuse. Details on the order, which forced Yahoo to take part in the controversial PRISM surveillance program, were unveiled in a Washington Post report based on court documents unsealed Thursday.

Yahoo (NASDAQ: YHOO) ultimately lost a legal battle that began when the company complained that the intelligence agency had gone outside the traditional legal process that forces the order to undergo court review before surveillance is installed. Instead, the NSA earned permission from the Foreign Intelligence Surveillance Court, a secret court that’s been criticized as a “rubber stamp” for surveillance requests. Yahoo’s failed appeal also became a precedent for the NSA, which soon pressed other Silicon Valley titans including Google (NASDAQ: GOOGL), Apple (NASDAQ: AAPL) and Facebook (NASDAQ: FB) to start turning over users’ metadata.

“The released documents underscore how we had to fight every step of the way to challenge the U.S. government’s surveillance efforts,” Yahoo general counsel Ron Bell wrote in a Tumblr post detailing the legal wrangling. “At one point, the U.S. government threatened the imposition of $250,000 in fines per day if we refused to comply.”

PRISM, which was discontinued in 2011 and first revealed by former NSA contractor Edward Snowden in July 2013, was the program that gave NSA intelligence analysts the ability to monitor much of the world’s raw electronic communications if they could determine with a 51 percent certainty that the target was not an American citizen.

The NSA forced Yahoo and the like to turn over “metadata,” which doesn’t include the contents of an email, for instance, but the sender, recipient, time of transmission, IP address information, the subject of the email and other identifying information. Previous reports have suggested that intelligence analysts using the correct metadata wouldn’t need the contents of a message to accurately determine what a communication said. The popular example is the hypothetical surveillance subject who phones, in order, a pharmacy, male friend then finally an abortion clinic.

Intelligence officials wrote in a briefing published last year by the Post that the NSA perceived Silicon Valley’s involvement in PRISM as one of the program’s most important aspects.

“98 percent of PRISM production is based on Yahoo, Google and Microsoft; we need to make sure we don’t harm these sources,” the memo explained.

In a statement given upon PRISM’s public disclosure Director of National Intelligence James Clapper said “information collected under this program is among the most important and valuable foreign information we collect, and is used to protect our nation from a wide variety of threats.”