WASHINGTON – The Justice Department under Attorney General William Barr launched a vast surveillance program that gathered records of innocent Americans’ international phone calls without first conducting a review of whether it was legal, the department’s inspector general concluded Thursday.

It happened in 1992, the last time Barr served as attorney general.

The secret program, run by the Drug Enforcement Administration, ultimately gathered billions of records of nearly all phone calls from the United States to 116 countries, with little oversight from Congress or the courts, a USA TODAY investigation found. It provided a blueprint for far broader phone-data surveillance the government launched after the terrorist attacks of Sept. 11, 2001.

The program was the government’s first known effort to gather records on Americans in bulk, sweeping up information related to millions of Americans regardless of whether they were suspected of a crime. Attorney General Eric Holder ordered the DEA to halt the collection in 2013, after leaks by former National Security Agency contractor Edward Snowden sparked an uproar about the government’s data dragnets.

The DEA obtained those records using administrative subpoenas that allow the agency to collect records "relevant or material to" federal drug investigations without seeking authorization from a judge. The Inspector General said the government did not pause to consider whether its powers allowed it to collect records unrelated to a specific investigation, though former officials familiar with the program have acknowledged that they thought it was an aggressive understanding of the law.

Former Attorney General William Barr is flanked by then-Sen. Joseph Biden, D-Del., and Sen. Patrick Leahy, D-Vt., prior to Barrís nomination hearing on Capitol Hill in Washington, Nov. 12, 1991.(Photo: John Duricka, AP)

The Inspector General’s report identified areas in which the program would be vulnerable to legal challenges, but did not reach a conclusion about whether it was lawful.

DEA spokeswoman Katherine Pfaff said in a statement that the agency was taking steps to improve its use of administrative subpoenas to gather data, and that the agency's policies "continue to be vetted through a rigorous legal review."

The DEA program did not intercept the content of Americans' calls, but the records – which numbers were dialed and when – allowed agents to map suspects' communications and link them to troves of other police and intelligence data. Agents used those records to search for connections between Americans and overseas drug trafficking groups, though the Inspector General said the drug agency also permitted other agencies to use the records in different types of criminal investigations.

At its peak, the program harvested records of nearly all calls from the United States to Mexico, Canada, nearly all of Central and South America and much of the rest of the world.

The program, known within the drug agency as USTO (a play on call going from the United States to other countries), was carried out in part by the department’s Criminal Division, run at the time by Robert Mueller.

Attorney General William Barr arrives to testify before the House Appropriation subcommittee on Commerce, Justice, Science, and Related Agencies on Capitol Hill April 9, 2019. Jack Gruber, USA TODAY NETWORK

U.S. Attorney General William Barr departs his home March 23, 2019 in McLean, Virginia. Special Counsel Robert Mueller delivered the report from his investigation into Russian interference in the 2016 presidential election to Barr yesterday and Barr is expected to brief members of Congress on the report this weekend. Win McNamee, Getty Images

U.S. Attorney General William Barr departs his home March 23, 2019 in McLean, Virginia. Special Counsel Robert Mueller delivered the report from his investigation into Russian interference in the 2016 presidential election to Barr yesterday and Barr is expected to brief members of Congress on the report this weekend. Win McNamee, Getty Images

A copy of a letter from Attorney General William Barr advising Congress that Special Counsel Robert Mueller has concluded his investigation, is shown Friday, March 22, 2019 in Washington. Robert Mueller on Friday turned over his long-awaited final report on the contentious Russia investigation that has cast a dark shadow over Donald Trump's presidency, entangled Trump's family and resulted in criminal charges against some of the president's closest associates. Jon Elswick, AP

Attorney General William Barr leaves his home in McLean, Va. March 22, 2019. Special counsel Robert Mueller has filed his final report to Barr, signaling the end of his investigation into Russian interference in the 2016 presidential election. Erik S. Lesser, EPA-EFE

Attorney General William Barr, left, leaves after a meeting at the West Wing of the White House March 21, 2019 in Washington, DC. Key law-enforcement officials in Washington are preparing for the release of the report by special counsel Robert Mueller. Alex Wong, Getty Images

Attorney General William Barr talks with US President Donald J. Trump as he delivers remarks on the national security and humanitarian crisis on the southern border and vetoes the legislation that strikes down his national emergency declaration at the southern border a ceremony in the Oval Office of the White House in Washington, DC, on March 15, 2019. President Trump's veto, his first, sends the resolution back to Congress where it will require a 2/3 vote in each house to overturn. Shawn Thew, EPA-EFE

Former Attorney General William Barr arrives to meet with senators on Jan. 9, 2019, in Washington, ahead of his confirmation hearing. President Donald Trump nominated Barr to again lead the Justice Department, to replace Jeff Sessions. NICHOLAS KAMM, AFP/Getty Images

Attorney General nominee William Barr arrives for a meeting with Senate Judiciary Committee member Sen. Lindsay Graham (R-SC) in his office in the Russell Senate Office Building on Capitol Hill Jan. 9, 2019. Chip Somodevilla, Getty Images

This undated photo provided by Time Warner shows William Barr. President Donald Trump said Dec. 7, 2018 he will nominate former Attorney General William Barr to again lead the Justice Department. Time Warner via AP

President George H.W Bush, right, and William Barr wave after Barr was sworn in as the new Attorney General of the United States at a Justice Department ceremony in Washington on Nov. 26, 1991. Scott Applewhite, AP

President George H.W. Bush meets with Attorney General William Barr in the Oval Office at morning, May 1, 1992 in White House. In a dramatic change of tone in just a few hours, Bush went from expressing "frustration and anguish" over the verdict in the Rodney King case to declaring "revulsion and pain" over the violent uprising that terrorized Los Angeles. AP

President George H.W. Bush gestures during an address in the Rose Garden of the White House in Washington, April 24, 1992 honoring the National Crime Victims Rights Award winners. Attorney General William Barr looks on at right. Each year the Justice department awards those individuals who have worked on behalf of crime victims and honors the accomplishments of the Victims of Crime Act passed in 1984. J. Scott Applewhite, AP

George H.W. Bush signs into law new civil rights guarantees for women and minorities at a Rose Garden ceremony, Nov. 21, 1991 in Washington, as Vice President Dan Quayle, left, and Acting Attorney General William Barr look on. The bill signing capped a two-year struggle with congress over whether the legislation encouraged job quotas. Marcy Nighswander, AP

Acting U.S. Attorney General William Barr points to a fragment of a circuit board during a news conference on Pan Am Flight 103 in Washington, Nov. 14, 1991. The tiny fragment was described as part of the bomb inside a portable radio. Two Libyan intelligence officials were indicted in the bombing of the plane over Lockerbie, Scotland in 1988, which killed 270 people. Barry Thumma, AP