The director of national intelligence on Saturday declassified more documents that outline how the National Security Agency was first authorised to start collecting bulk phone and internet records in the hunt for al-Qaida terrorists and how a court eventually gained oversight of the program, after the justice department complied with a federal court order to release its previous legal arguments for keeping the programs secret.

James Clapper explained in a statement on Saturday that President George W Bush first authorised the spying in October 2001, as part of the Terrorist Surveillance Program, just after the 9/11 attacks. Bush disclosed the program in 2005.

The Terrorist Surveillance Program, which had to be extended every 30-60 days by presidential order, was eventually replaced by the Foreign Intelligence Surveillance Act, a law that requires a secret court to authorise the bulk collection.

The US president, Barack Obama, hinted on Friday that he would consider some changes to the NSA's bulk collection of Americans' phone records to address the public's concerns about privacy. His comments came in a week in which a federal judge declared the NSA's collection program "unconstitutional," and a presidential advisory panel suggested 46 changes to NSA operations. Those recommendations included forcing the NSA to go to the court for every search of the phone records database and keeping that database in the hands of a third party, not the government.

The judge said there was little evidence any terror plot had been thwarted by the program, known as Section 215 of the USA Patriot Act.

The panel recommended continuing the program but seeking a court order for each NSA records search. Obama said he would announce his decisions in January.

"There has never been a comprehensive government release ... that wove the whole story together: the timeline of authorizing the programs and the gradual transition to (court) oversight," said Mark Rumold, staff attorney at the Electronic Frontier Foundation, a civil liberties group suing the NSA to reveal more about the bulk records programs. "Everybody knew that happened, but this is the first time I've seen the government confirm those twin aspects."

That unexpected windfall of disclosures early on Saturday came with the release of documents outlining why issuing the information would damage national security. The US district court in the northern district of California in the fall had ordered the Obama administration to make public the documents, known as state secrets declarations.

The justice department issued the declarations late on Friday in two ongoing class action cases: Shubert v Bush, now known as Shubert v Obama, on behalf of Verizon customers; and Jewel v NSA, on behalf of AT&T customers.

Calls to the justice department and the director of national intelligence's office were not answered.

"In September, the federal court in the northern district of California ... ordered the government to go back through all the secret ex parte declarations and declassify and release as much as they could, in light of the Snowden revelations and government confirmations," Rumold said. "So what was released late last night was in response to that court order."

In one such legal argument, former national intelligence director Dennis Blair told the court in 2009 that revealing information – including how information was collected, whether specific individuals were being spied upon and what the programs had revealed about al-Qaida – could damage the hunt for terrorists.

"To do so would obviously disclose to our adversaries that we know of their plans and how we may be obtaining information," Blair said. Much of his 27-page response is redacted.