The senators’ comments, along with those of other members of Congress briefed on the program, suggested that they considered the eavesdropping and data mining so closely tied that they were part of a single program. Both activities, which ordinarily require warrants, were started without court approval as the Bush administration intensified counterterrorism efforts soon after the Sept. 11 attacks.

A half-dozen officials and former officials interviewed for this article would speak only on the condition of anonymity, in part because unauthorized disclosures about the classified program are already the subject of a criminal investigation. Some of the officials said the 2004 dispute involved other issues in addition to the data mining, but would not provide details. They would not say whether the differences were over how the databases were searched or how the resulting information was used.

Nor would they explain what modifications to the surveillance program President Bush authorized to head off the threatened resignations by Justice Department officials.

An agency spokesman declined to comment on the data mining issue but referred a reporter to a statement issued earlier that Mr. Gonzales had testified truthfully.

The Justice Department announced in January that eavesdropping without warrants under the Terrorist Surveillance Program had been halted, and that a special intelligence court was again overseeing the wiretapping. The N.S.A., the nation’s largest intelligence agency, generally eavesdrops on communications in foreign countries. Since the 1978 passage of the Foreign Intelligence Surveillance Act, known as FISA, any eavesdropping to gather intelligence on American soil has required a warrant from the special court.

In addition, court approval is required for the N.S.A. to search the databases of telephone calls or e-mail records, usually compiled by American phone and Internet companies and including phone numbers or e-mail addresses, as well as dates, times and duration of calls and messages. Sometimes called metadata, such databases do not include the content of the calls and e-mail messages — the actual words spoken or written.

Government examination of the records, which allows intelligence analysts to trace relationships between callers and identify possible terrorist cells, is considered less intrusive than actual eavesdropping. But the N.S.A.’s eavesdropping targeted international calls and e-mail messages of people inside the United States, while the databases contain primarily domestic records. The conflict in 2004 appears to have turned on differing interpretations of the president’s power to bypass the FISA law and obtain access to the records.