Documents declassified Saturday detail how the National Security Agency’s mass data collection was first authorized under President George W. Bush.

The spying was approved in Oct. 2001, one month after the Sept. 11 attacks, the Associated Press reports. Renewed every 30 to 60 days by Bush, the Terrorist Surveillance Program evolved into the Foreign Intelligence Surveillance Act, which required a secret court to approve the continuation of bulk phone and Internet data collection. Bush did not disclose the program until 2005.

“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, an attorney representing a civil liberties group suing the NSA. “Everybody knew that happened, but this is the first time I’ve seen the government confirm those twin aspects.”

The announcement from Director of National Intelligence James Clapper is the latest in a string of efforts aimed at defending NSA surveillance in the wake of leaked documents by former contractor Edward Snowden.

Clapper also revealed court documents from previous intelligence directors who argued in favor of keeping the program secret in compliance with a federal court order. The U.S. District Court in the Northern District of California ordered the White House to publicly disclose documents on why releasing information would threaten national security.

Earlier this week a federal judge ruled NSA’s collection program unconstitutional, citing little evidence that any terror plots had been thwarted by the program. A presidential advisory panel also proposed 46 changes to NSA practices, including seeking a court order for each NSA search.

The Justice Department and the director of national intelligence’s office did not return phone calls to the AP.