WASHINGTON, Oct. 2  Jack L. Goldsmith, a Harvard law professor who led the Justice Department office that objected to a Bush administration domestic eavesdropping plan, told a Senate committee on Tuesday that the situation became a “legal mess” because the White House did not believe either the courts or Congress had any role to play.

Professor Goldsmith told the Judiciary Committee that chances to create a legally justified program were undercut by senior White House officials who were averse to any restraint on presidential power and devoted to extreme secrecy.

“It was the biggest legal mess I had ever encountered,” said Professor Goldsmith, who raised his objections to the program run by the National Security Agency while head of the Office of Legal Counsel.

He also said David Addington, Vice President Dick Cheney’s counsel, told him that his position might mean failure to halt a new terrorist attack that would leave him with the blood of thousands on his hands. Professor Goldsmith was greeted largely as a hero by Democrats on the Judiciary Committee who praised him for standing up to enormous pressure with his objections.