In 2008, the U.S. government threatened to fine Yahoo $250,000 a day if it didn’t hand over user data as part of the NSA’s controversial PRISM program, according to court documents released today.

The 1,500 page document outlines Yahoo’s legal struggle to challenge the U.S. surveillance laws — which were part of the PRISM program, established to acquire data from tech giants including Apple, Microsoft, Facebook, and Yahoo — by calling them unconstitutional.

Yahoo lost its legal battle and had to provide the requested email metadata (not the actual content of emails, but the information about which users sent emails to each other and when).

Yahoo General Counsel Ron Bell wrote that the full document, which will be linked on Yahoo’s blog soon, proves that Yahoo “had to fight every step of the way to challenge the U.S. government’s surveillance efforts.”

As Craig Timberg of the Washington Post points out, Federal Judge William Bryson, presiding judge of the Foreign Intelligence Surveillance Court of Review, ordered the documents unsealed. PRISM, which was revealed to the public by whistleblower Edward Snowden, was discontinued in 2011.

This story originally appeared on Business Insider. Copyright 2014