The National Security Agency's eavesdropping program set off heated legal concerns and silent protests inside the Bush administration within hours of its adoption in October 2001, according to current and former government officials.

In making its case to Congress for broadened spy powers, the White House has emphasized the firm legal foundations of the program conducted after the Sept. 11 attacks. It has even taken the unusual step of giving lawmakers access to classified presidential orders from 2001 and early legal opinions to try to show that the program was on sound legal footing from the start.

But many of the tensions that were roiling the administration at the start of the program have never become public.

In one previously undisclosed episode, then-Deputy Attorney General Larry Thompson refused to sign off on any of the secret wiretapping requests that grew out of the program because of the secrecy and legal uncertainties surrounding it, the officials said.

He was not given access to details of the NSA operation, and was so uncomfortable with the idea of approving this new breed of wiretap applications that he had a top adviser write a memorandum assessing the legal ramifications. The adviser warned him not to sign the warrant applications because it was unclear where the wiretaps were coming from.

FBI bumps into it

Inside the FBI, technicians stumbled onto the NSA program accidentally within 12 hours of its inception, setting off what officials described as a brief firestorm of anxiety among senior officials. Some who had not been told about it were concerned that the agency was violating laws that required a court order for the singling out of Americans in wiretaps, and they immediately alerted higher-ups as to what they had discovered.

"What's going on here? Is this legal?" one FBI official asked after learning of the NSA operation on American soil.

FBI Director Robert Mueller assured nervous officials that the program had been approved by President Bush, several officials said. But the presidential approval, one former intelligence official disclosed, came without a formal legal opinion endorsing the program by the Office of Legal Counsel at the Justice Department.

At the outset of the program, then-Attorney General John Ashcroft signed off on the surveillance program at the direction of the White House with little in the way of a formal legal review, the official said.

Shoved in front of Ashcroft

Ashcroft complained to associates at the time that the White House, in getting his signature for the surveillance program, "just shoved it in front of me and told me to sign it."

Aides to Ashcroft were worried, however, that in approving a surveillance program that appeared to test the limits of presidential authority, Ashcroft was left legally exposed without a formal opinion from the Office of Legal Counsel, which acts as the legal adviser for the entire executive branch.

At that time, the office had already issued a broad, classified opinion declaring the president's powers in the abstract in wartime, but it had not weighed in on the legality of the NSA program or the specifics of the surveillance operation, officials said.

The nervousness among Justice Department officials led the administration to secure a formal opinion from John Yoo, a deputy in the Office of Legal Counsel, declaring that the president's wartime powers allowed him to order the NSA to intercept the international communications of terror suspects without a standard court warrant.

Still classified

The opinion remains classified and has not been made public. It was apparently written in late 2001 or early 2002, but it was revised in 2004 by a new cast of senior lawyers at the Justice Department, who found the earlier opinion incomplete and somewhat shoddy. Yoo declined to discuss the issue. Even after the final legal opinions were written, lawyers at the National Security Agency were not allowed to see them, officials said.

Justice Department officials declined comment for this article, saying they would not discuss internal deliberations on a classified program.

The White House, which also declined to comment, is now at an impasse with the House over Bush's efforts to secure broader spy powers for the NSA as well as retroactive immunity for the phone companies that helped in the warrantless wiretapping program. The Senate has agreed to give immunity, but the House has refused.

In the past, the White House has said there was widespread agreement among administration officials over the president's authority to order warrantless surveillance inside the United States.

Former Attorney General Alberto Gonzales told Congress that there was never any disagreement within the administration over the issue. After it was disclosed that senior Justice Department officials had threatened to resign over aspects of the program in 2004, lawmakers attacked the truthfulness of Gonzales' remarks. At the insistence of Vice President Dick Cheney, knowledge of the program was restricted to a tight circle of top officials and congressional briefings were unusually limited.

But several current and former officials involved in the program said they believed the intense secrecy was to blame for much of the early nervousness among other senior officials who had integral roles in intelligence operations yet were not allowed to know the full details of what was happening.