Attorney General Eric Holder on Tuesday defended the Justice Department’s secret examination of Associated Press phone records though he declared he had played no role in it, saying it was justified as part of an investigation into a grave national security leak.

The government’s wide-ranging information gathering from the news cooperative has created a bipartisan political headache for President Barack Obama, with prominent Republicans and Democrats on Capitol Hill expressing outrage, along with press freedom groups.

The government obtained the records from April and May of 2012 for more than 20 separate telephone lines assigned to AP and its journalists, including main offices. AP’s top executive called the action a massive and unprecedented intrusion into how news organizations do their work.

Federal officials have said investigators are trying to hunt down the sources of information for a May 7, 2012, AP story that disclosed details of a CIA operation in Yemen to stop an airliner bomb plot around the anniversary of the killing of Osama bin Laden. The probe is being run out of the U.S. Attorney’s office in the District of Columbia.

Asked about it at a news conference on a separate topic, Holder said he removed himself from the leaked-information probe because he himself had been interviewed by FBI agents as part of the investigation. He said he wanted to ensure that the probe was independently run and to avoid any appearance of a conflict of interest. It was the Justice Department’s No. 2 official, Deputy Attorney General James Cole, who made the decision to seek news media phone records, the department said.

“This was a very serious leak, a very grave leak” that “put the American people at risk,” Holder said. He called it one of the two or three most serious such episodes he had seen since he became a prosecutor in 1976 but did not say specifically how the disclosure of information about the plot had endangered Americans.

In February, CIA Director John Brennan provided a less-than-ominous description of the plot in testimony to the Senate Intelligence Committee. He told the panel that “there was never a threat to the American public as we had said so publicly, because we had inside control of the plot and the device was never a threat to the American public.”

The bomb plot came to light after the White House had told the public it had “no credible information that terrorist organizations, including al-Qaida, are plotting attacks in the U.S. to coincide with the anniversary of bin Laden’s death.”

In a letter to AP on Tuesday, Cole said the Justice Department had adhered to its rules for subpoenas for the news media and hadn’t sought information about the content of calls. “The records have not been and will not be provided for use in any other investigations,” Cole wrote.

In response, AP President and CEO Gary Pruitt said the department’s response failed to justify the breadth of its subpoena, which included phone numbers in locations used by more than 100 journalists.

Condemnation of the government’s seizure of the AP phone records came from both political parties.

Republican National Committee Chairman Reince Priebus called on Holder to resign, saying he had “trampled on the First Amendment.”

Sen. Patrick Leahy, D-Vt., chairman of the Senate Judiciary Committee, said “the burden is always on the government when they go after private information, especially information regarding the press or its confidential sources. … On the face of it, I am concerned that the government may not have met that burden.”