Updated

The Drug Enforcement Administration has formally acknowledged that it maintained a sweeping database of phone calls made from the United States to multiple foreign countries. The program has since been discontinued, the Justice Department said Friday.

The revelation was made in a court filing in the case of a man accused of conspiring to export goods and technology illegally to Iran.

A DEA official wrote in a three-page document filed Thursday that the program relied on administrative subpoenas to collect records of calls originating in the U.S. to foreign countries, including Iran, that were "determined to have a demonstrated nexus to international drug trafficking and related criminal activities."

The statement says the records kept track of the date, time and duration of the phone call between the initiating telephone number and the receiving telephone number.

The database could then be used to query a specific telephone number if law enforcement officials "had a reasonable articulable suspicion that the telephone number was related to an ongoing federal criminal investigation," according to a declaration by Robert Patterson, a DEA assistant special agent in charge. The statement said the database did not include consumer content or personal identifying information.

Patrick Rodenbush, a Justice Department spokesman, said the program was discontinued in September 2013 and that all information held in the database has been deleted.

In a letter dated in March 2014, Sen. Patrick Leahy, then chairman of the Senate Judiciary Committee, urged Attorney General Eric Holder to ensure that the DEA program was discontinued and also made public. The program was collecting an "enormous number of records" as part of routine drug investigations, through methods that were intrusive and discriminate, according to the letter made public Friday.

The program is separate from a National Security Agency phone records program exposed in 2013 by former NSA systems analyst Edward Snowden. Though the DEA database appears to be more limited in scope, Leahy and others said its existence shows the extent to which electronic government surveillance has not been limited to counterterrorism investigations.

"The fact that the DEA has been engaged in similar bulk collection of records from service providers about calls between the United States and many other countries, and has been doing so without judicial review or independent oversight, is of great concern," Leahy, D-Vt., wrote in the letter.

Hanni Fakhoury, a staff attorney at the Electronic Frontier Foundation, said he wasn't surprised by the revelations of the DEA database, noting that, "When one agency starts doing something, other agencies are going to look for ways to also do it" if they think it would be helpful to them.

In a statement, American Civil Liberties Union attorney Patrick Toomey said the disclosure "underscores how the government has extended its use of bulk collection far beyond the NSA and the national security context, and into ordinary criminal investigations.

"It also shows yet again how the government has used strained legal theories to justify the surveillance of millions of innocent Americans under laws that were never written for that purpose," he added.