Declan McCullagh/CNET

The Obama administration released a trove of newly declassified documents related to the National Security Agency's surveillance activities on Monday, including what appears to be the original secret court ruling authorizing the massive data collection program.

The ruling by the secretive Foreign Intelligence Surveillance Court was among hundreds of documents released by James R. Clapper Jr., the director of national intelligence, in response to Freedom of Information Act lawsuits. The documents also reveal the NSA's violations of court-ordered limits of the program.

The 87-page opinion, signed by Judge Colleen Kollar-Kotelly, then the chief judge on the secret surveillance court, authorized the NSA to collect e-mail metadata and other Internet communications. However, the section describing the metadata to be collected was blacked out.

"The raw volume of the proposed collection is enormous," Kollar-Kotelly wrote in the heavily redacted opinion, which blacked out a section that presumably went into greater detail about the size. While the date of her signature is blacked out, the opinion appears to be the July 2004 order that granted data-collection authority to the NSA and that placed the program under the court's supervision, according to documents leaked earlier this year by former NSA contractor Edward Snowden.

The metadata -- including the e-mail addresses and identities of the sender and recipient, but not the messages' contents -- was to be used in the government's counterterrorism programs.

"Analysts know that terrorists' e-mails are located somewhere in the billions of data bits; what they cannot know ahead of time is exactly where," the judge wrote. The metadata collection program, which was authorized by President George W. Bush in the wake of the September 2001 terrorist attacks, was discontinued in 2011 for what the Obama administration called "operational and resource reasons."

The documents also show that the NSA had trouble keeping its data collection within the court-mandated limits. Although redactions made it difficult to identify specific issues, a statement released with the documents Monday indicated that "longstanding compliance issues" were identified in 2009, leading the agency to recognize that its "compliance and oversight structure had not kept pace with its operational momentum."

Lawsuits from the American Civil Liberties Union and the Electronic Freedom Foundation helped push the government into publishing the documents.

"On the logic of these opinions, almost every digital footprint we leave behind can be vacuumed up by the government -- who we talk to, what we read, where we go online," said ACLU Patrick Toomey, an ACLU National Security Project attorney, in a statement. "Like previous releases, these materials show the danger of a government that sidesteps public debate and instead grounds its surveillance powers in the secret opinions of a secret court."

The EFF also isn't satisfied with how things have gone so far, according to an EFF statement before Monday's documents were released.

"The past few months have seen the tides turn dramatically in EFF's ongoing battle against secret surveillance law... There is still far too much that remains secret. Last week, we filed a brief with the FISA court on behalf of ProPublica seeking disclosure of more court opinions on NSA surveillance; next week, we'll argue in the DC Circuit that secret surveillance memos of the Department of Justice's Office of Legal Counsel can't be shielded from public scrutiny. And we'll keep using FOIA and the federal courts to fight for the public's right to know how its government has secretly interpreted federal surveillance law."

Clapper said in a statement that the document release was the result of an Obama order in June that directed him to "make public as much information as possible about certain sensitive programs while being mindful of the need to protect sensitive classified intelligence activities and national security."

"Release of these documents reflects the executive branch's continued commitment to making information about this intelligence collection program publicly available when appropriate and consistent with the national security of the United States," he wrote.

But the EFF said transparency was hardly the only motivation for the document release.

"With previous releases, the government has posted the documents to its Tumblr, IContheRecord, claiming that the disclosures were spurred only by President Obama's directive to declassify information and 'the interest of increased transparency.' Thus far, they've neglected to mention they were also under a court order to do so," the EFF said.

Updated at 5:13 a.m. PT with comment from the ACLU. CNET staff writer Stephen Shankland contributed to this report.