The National Security Agency will restrict access to, and ultimately destroy, millions of US phone records previously collected by the spy agency, the Office of the Director of National Intelligence (ODNI) announced Monday.

The federal law was passed in June ending the NSA's bulk collection of U.S. Citizen's Telephone records and destroying the data it collected under a controversial global spying program disclosed by former NSA contractor Edward Snowden.

So far, the ODNI didn't specify when the agency would destroy these metadata records, but noted that the metadata must be retained until the lawsuits around the metadata collection program are ongoing.

NSA's Bulk Metadata Collection is illegal

Section 215 of the Patriot Act legally authorizes the law enforcement agencies to collect "any tangible things" that the government proves are connected or linked to an investigation into any suspected terrorist.

However, the verdict in May ruled that the mass collection of metadata program run by the NSA is Not Authorized by Section 215 of the Patriot Act.

The metadata collection program began shortly after the September 2001 terrorist attacks, but the records have to be destroyed after every five years.

Under this program, the US intelligence agency collected only the data related to the called phone numbers. However, no content of the phone call conversations were recorded by the agency.

Spied on German Chancellor Angela Merkel

The surveillance program allegedly spied on not only US citizens, but also European firms and individual targets including German Chancellor Angela Merkel.

The bulk collection of metadata program was ruled illegal by a court in May 2015. A bill was passed last month by President Barack Obama and Congress that put an end to the data collection and instead allow the NSA to request the records from telecom companies if needed in terrorism investigations.

NSA to Request Records directs from the Telecoms

The new bill gives the agency a 6-month (180 days) grace period to end its metadata collection program as well as destroy the previous collected data, and develop a new system for requesting permission from the Foreign Intelligence Surveillance Act to access records from the telecom companies.

However, the records already in the agency's database would no longer be examined in terrorism investigations after six months of the court rule (i.e. 29 November, 2015), and would be destroyed as soon as possible, the ODNI said in a statement on Monday.

Found this article interesting? Follow us on Twitter and LinkedIn to read more exclusive content we post.