The US Justice Department secretly obtained two months of telephone records of reporters and editors for the Associated Press in what the news cooperative's top executive called a "massive and unprecedented intrusion" into how news organizations gather the news.

The records obtained by the Justice Department listed incoming and outgoing calls, and the duration of each call, for the work and personal phone numbers of individual reporters, general AP office numbers in New York, Washington and Hartford, Connecticut, and the main number for AP reporters in the House of Representatives press gallery, according to attorneys for the AP.

In all, the government seized those records for more than 20 separate telephone lines assigned to AP and its journalists in April and May of 2012. The exact number of journalists who used the phone lines during that period is unknown but more than 100 journalists work in the offices whose phone records were targeted on a wide array of stories about government and other matters.

In a letter of protest sent to attorney general Eric Holder on Monday, AP president and chief executive officer Gary Pruitt said the government sought and obtained information far beyond anything that could be justified by any specific investigation. He demanded the return of the phone records and destruction of all copies.

"There can be no possible justification for such an overbroad collection of the telephone communications of the Associated Press and its reporters. These records potentially reveal communications with confidential sources across all of the newsgathering activities undertaken by the AP during a two-month period, provide a road map to AP's newsgathering operations, and disclose information about AP's activities and operations that the government has no conceivable right to know," Pruitt said.

The government would not say why it sought the records. US officials have previously said in public testimony that the US attorney in Washington is conducting a criminal investigation into who may have leaked information contained in a May 7, 2012, AP story about a foiled terror plot. The story disclosed details of a CIA operation in Yemen that stopped an al-Qaida plot in the spring of 2012 to detonate a bomb on an airplane bound for the United States.

In testimony in February, CIA director John Brennan noted that the FBI had questioned him about whether he was AP's source, which he denied. He called the release of the information to the media about the terror plot an "unauthorized and dangerous disclosure of classified information."

Prosecutors have sought phone records from reporters before, but the seizure of records from such a wide array of AP offices, including general AP switchboards numbers and an office-wide shared fax line, is unusual and largely unprecedented.

In the letter notifying the AP received Friday, the Justice Department offered no explanation for the seizure, according to Pruitt's letter and attorneys for the AP. The records were presumably obtained from phone companies earlier this year although the government letter did not explain that. None of the information provided by the government to the AP suggested the actual phone conversations were monitored.

Among those whose phone numbers were obtained were five reporters and an editor who were involved in the May 7, 2012 story.

The Obama administration has aggressively investigated disclosures of classified information to the media and has brought six cases against people suspected of leaking classified information, more than under all previous presidents combined.

Justice Department published rules require that subpoenas of records from news organizations must be personally approved by the attorney general but it was not known if that happened in this case. The letter notifying AP that its phone records had been obtained though subpoenas was sent Friday by Ronald Machen, the US attorney in Washington.

Spokesmen in Machen's office and at the Justice Department had no immediate comment on Monday.

The Justice Department lays out strict rules for efforts to get phone records from news organizations. A subpoena can only be considered after "all reasonable attempts" have been made to get the same information from other sources, the rules say. It was unclear what other steps, in total, the Justice Department has taken to get information in the case.

A subpoena to the media must be "as narrowly drawn as possible" and "should be directed at relevant information regarding a limited subject matter and should cover a reasonably limited time period," according to the rules.

The reason for these constraints, the department says, is to avoid actions that "might impair the news gathering function" because the government recognizes that "freedom of the press can be no broader than the freedom of reporters to investigate and report the news."

News organizations normally are notified in advance that the government wants phone records and enter into negotiations over the desired information. In this case, however, the government, in its letter to the AP, cited an exemption to those rules that holds that prior notification can be waived if such notice, in the exemption's wording, might "pose a substantial threat to the integrity of the investigation."

It is unknown whether a judge or a grand jury signed off on the subpoenas.

The May 7, 2012, AP story that disclosed details of the CIA operation in Yemen to stop an airliner bomb plot occurred around the one-year anniversary of the May 2, 2011, killing of Osama bin Laden.

The plot was significant because the White House had told the public it had "no credible information that terrorist organizations, including al-Qaida, are plotting attacks in the US to coincide with the (May 2) anniversary of bin Laden's death."

The AP delayed reporting the story at the request of government officials who said it would jeopardize national security. Once government officials said those concerns were allayed, the AP disclosed the plot because officials said it no longer endangered national security. The Obama administration, however, continued to request that the story be held until the administration could make an official announcement.

The May 7 story was written by reporters Matt Apuzzo and Adam Goldman with contributions from reporters Kimberly Dozier, Eileen Sullivan and Alan Fram. They and their editor, Ted Bridis, were among the journalists whose April-May 2012 phone records were seized by the government.

Brennan talked about the AP story and leaks investigation in written testimony to the Senate. "The irresponsible and damaging leak of classified information was made ... when someone informed the Associated Press that the US government had intercepted an IED (improvised explosive device) that was supposed to be used in an attack and that the US government currently had that IED in its possession and was analyzing it," he said.

He also defended the White House's plan to discuss the plot immediately afterward. "Once someone leaked information about interdiction of the IED and that the IED was actually in our possession, it was imperative to inform the American people consistent with government policy that there was never any danger to the American people associated with this al-Qa'ida plot," Brennan told senators.