Chris Inglis (L), Deputy Director of the National Security Agency, General Keith Alexander (2nd L), director of the National Security Agency, Director of National Intelligence James Clapper and Deputy Attorney General James Cole (R) are pictured at a House Intelligence Committee hearing on Capitol Hill in Washington, October 29, 2013. The hearing was on the potential changes to the foreign intelligence surveillance act (FISA). REUTERS/Jason Reed (UNITED STATES - Tags: POLITICS MILITARY CRIME LAW) - RTX14T07

The Foreign Intelligence Surveillance (FISA) Court on Friday ordered the release of a partially declassified court opinion, which explains the government’s justification for the collection and surveillance of bulk telephone records by the National Security Agency.

In response to a request from the American Civil Liberties Union and the Media Freedom and Information Access Clinic, the court said its order “would enhance, rather than detract from, public understanding of the Court’s reasoning as to the legal issues presented,” according to The Hill.

The opinion in question handed down in February 2013 explains how Section 215 of the PATRIOT Act can be interpreted to allow NSA to conduct the bulk collection of telephone metadata — which can include phone numbers, call durations and frequency — in its anti-terror surveillance operations.

Recent legislation in Congress including a House-passed version of the USA FREEDOM Act and its Senate companion bill seek to directly address and reform the way Section 215 is interpreted, and specifically prevent the bulk collection and retention of records. (RELATED: House Passes ‘Gutted’ NSA Surveillance Reform Bill)

Written by former PATRIOT Act author Rep. Jim Sensenbrenner and Sen. Patrick Leahy, the latest Senate version unveiled at the end of July would take record retention out of NSA’s hands and make telephone service providers responsible for keeping the data. Along with other reforms, agencies like NSA would be required to obtain court orders to obtain specific individuals’ data, along with those they interact with. (RELATED: Senate Unveils New NSA Reform Bill, Silicon Valley, Privacy Advocates Praise)

The court has given the government until Aug. 29 to release the opinion.