The U.S. Department of Justice (DOJ) will release hundreds of pages of court documents elucidating the National Security Agency’s legal rationale for its controversial domestic surveillance activities.

The DOJ’s announcement comes in response to a lawsuit filed by the Electronic Frontier Foundation (EFF). In the suit, the foundation demanded that the U.S. government reveal how its secretive Foreign Intelligence Surveillance Court (FISC) interprets the Patriot Act to surveil millions of Americans.

In question is Section 215 of the legislation, which allows agencies to obtain a secret court order for “any tangible thing” deemed relevant to a counterintelligence or counterterrorism investigation.

The NSA has interpreted the vague language of Section 215 to justify collecting the phone records of millions of Americans in the years since September 11, 2001. The EFF described the provision as “seemingly limitless,” possibly encompassing “everything from driver’s license records to Internet browsing patterns.”

The EFF originally filed its complaint against the DOJ back in 2011, on the tenth anniversary of the passage of the Patriot Act. In July, a District Court judge ordered the department to comply.

On Wednesday, the DOJ filed its reply, agreeing to publish “orders and opinions of the FISC issued from January 1, 2004, to June 6, 2011, that contain a significant legal interpretation of the government’s authority or use of its authority under Section 215; and responsive ‘significant documents, procedures, or legal analyses incorporated into FISC opinions or orders and treated as binding by the Department of Justice or the National Security Agency.’”

Section 215 has long been the subject of controversy among lawmakers. Back in 2009, after being briefed on Section 215 of the Patriot Act, Senator Richard Durbin (D-Ill.) commented: “Section 215 is unfortunately cloaked in secrecy. Some day that cloak will be lifted, and future generations will ask whether our actions today meet the test of a democratic society: transparency, accountability, and fidelity to the rule of law and our constitution.”

The Justice Department said it will begin releasing the documents next week.

Photo by Bart Everson/Flickr