WASHINGTON -- James B. Comey, President Obama's nominee for F.B.I. director, said on Tuesday that he no longer believed it was legal to waterboard detainees under United States law. His statements contrasted with the position he took in 2005 when, as President George W. Bush's deputy attorney general, he oversaw the government's legal opinions.
At his confirmation hearing before the Senate Judiciary Committee on Tuesday, Mr. Comey said that the government's statute on the issue at the time was vague, complicating the ability of government lawyers to determine its legality. He said that despite his authorization of the opinions in 2005, he had urged senior Bush administration officials to end the use of the practice.
"Even though I as a person, as a father, as a leader thought, 'That's torture -- we shouldn't be doing that kind of thing,' I discovered that it's actually a much harder question to interpret this 1994 statute, which I found very vague," Mr. Comey, 52, said at the hearing.
Many senators, legal scholars and human rights advocates have long believed that the 1994 statute clearly banned waterboarding.
Mr. Comey said that he urged the attorney general at the time, Alberto R. Gonzales, to make his point directly to the White House.
"He took my -- actually literally took my notes with him to a meeting at the White House and told me he made my argument in full and that the principals were fully on board with the policy, and so my argument was rejected," he said.
Mr. Comey did not say at the hearing why his position had changed. But one of his aides said Tuesday afternoon that Mr. Comey believed waterboarding was illegal for several reasons: President Obama had banned its use, the legal opinions supporting it had been withdrawn, and Congress passed an act in late 2005 clearly banning such treatment.
Mr. Comey's current position on the legality of waterboarding brings him into line with President Obama, Attorney General Eric H. Holder Jr. and several senior Democratic senators who had raised concerns about his position in the days leading up to the hearing.
Mr. Comey's nomination has received strong bipartisan support, but some Democrats and civil liberty groups have raised questions about his role in the Bush administration. Last week, two of the Democratic senators, Richard J. Durbin of Illinois and Sheldon Whitehouse of Rhode Island, sent a letter to Mr. Comey, expressing their concern about how he approved the use of "enhanced interrogation techniques" that included waterboarding.
On Tuesday, many of the senators appeared satisfied with Mr. Comey's answers about waterboarding, and it does not appear that the Republicans will try to block his confirmation.
Mr. Comey distinguished himself from many members of the Bush administration -- and significantly raised his national profile -- when he testified before the same Senate committee five years ago. His testimony was perceived as repudiating government surveillance programs.
At the hearing, about the Justice Department's firings of several United States attorneys, Mr. Comey riveted the senators by testifying about a 2004 episode in which he thwarted Bush administration officials from persuading his ailing boss, Attorney General John Ashcroft, to sign off on an illegal data-collection program. Although Mr. Comey's objections halted the program, it was later resumed under a similar legal framework, and senior Bush administration officials have said he raised few objections to other programs.
Mr. Comey did not provide new details about the incident on Tuesday, but he addressed the issue of government surveillance, which has become a thorny issue given a series of disclosures of classified programs by Edward J. Snowden, a former National Security Agency contractor. Mr. Comey also defended the use of surveillance programs to identify terrorists.
"I do know as a general matter that the collection of metadata and analysis of metadata is a valuable tool in counterterrorism," he said.
Mr. Comey has served as the United States attorney in Manhattan and most recently as the general counsel at a huge hedge fund in Connecticut and at Lockheed Martin. On Tuesday, he sidestepped several questions about the transparency of legal rulings that govern the surveillance programs and the force-feeding of detainees at Guantánamo Bay, Cuba.
Unlike more contentious nomination hearings, the banter between Mr. Comey and the senators was blithe.
As Mr. Comey introduced his family, he mentioned how his five children, who are in their teens and 20s and were seated behind him, had been in nearly the same seats 10 years ago when he was confirmed as deputy attorney general.
"They're a little bit older," Mr. Comey said.
"I was going to say," said Patrick J. Leahy, Democrat of Vermont and the committee chairman. "They -- they -- I was here at that time and they have been changed."
"They have, right," Mr. Comey said. "The only one who hasn't aged a bit is my wife."
The senators laughed.
This article originally appeared in The New York Times.