The Senate confirmed retired judge Michael Mukasey as attorney general to replace Alberto Gonzales, who was forced from office in a scandal over his handling of the Justice Department.

Mukasey was confirmed late Thursday as the United States' 81st attorney general after a sharp debate over his refusal to say whether the waterboarding interrogation technique, which simulates drowning, is torture.

President Bush thanked the Senate, even though the margin had been whittled down from nearly unanimous by a sharp debate over Mukasey's refusal to say whether the waterboarding interrogation technique is torture.

"He will be an outstanding attorney general," Bush said in a statement from his ranch in Crawford, Texas.

Republicans were solidly behind Bush's nominee. Democrats said their votes were not so much for Mukasey as they were for restoring a leader to a Justice Department left adrift after Gonzales' resignation in September.

In the end, Mukasey was confirmed by a 53-40 vote. Six Democrats and one independent joined Republicans in sealing his confirmation.

The choice, according to one of those Democrats, was essentially between "whether to confirm Michael Mukasey as the next attorney general or whether to leave the Department of Justice without a real leader for the next 14 months," said one Democratic supporter, Sen. Dianne Feinstein.

"This is the only chance we have," she said, referring to Bush's threat to appoint an acting attorney general not subject to Senate confirmation.

But members of her own party did not agree. Mukasey, his opponents argued, refused to say whether waterboarding is torture and put the onus on Congress to pass a law against the practice.

"This is like saying when somebody murders somebody with a a baseball bat and you say, 'We had a law against murder but we never mentioned baseball bats,"' said Judiciary Committee Chairman Patrick Leahy, a Democrat. "Murder is murder. Torture is torture."

Being better than Gonzales or an acting attorney general is not enough qualification for the job, said Democratic Sen. Edward M. Kennedy.

"The next attorney general must restore confidence in the rule of law," he said. "We cannot afford to take the judgment of an attorney general who either does not know torture when he sees it or is willing to look the other way."

The confirmation vote capped 10 months of scandal and resignations at the Justice Department. Mukasey's chief Democratic patron, Sen. Chuck Schumer, who like Mukasey is from New York, drove the probe into the purge of nine federal prosecutors that helped push Gonzales out.

The debate came after a tense day of negotiations that at one point featured Majority Leader Harry Reid threatening to postpone Mukasey's confirmation until December. His confirmation had long been certainty despite the debate over waterboarding.

Waterboarding, used by interrogators to make someone feel as if he is going to drown, is banned by domestic law and international treaties. But U.S. law applies to Pentagon personnel and not the CIA. The administration will not say whether it has allowed the agency's employees to use it against terror detainees.

"The United States will not be viewed kindly if we confirm as chief law enforcement officer of this country someone who is unwilling or unable to recognize torture when he sees it," said Sen. Dick Durbin, the Senate's No. 2 Democrat.

Mukasey has called waterboarding personally "repugnant," and in a letter to senators said he did not know enough about how it has been used to define it as torture. He also said he thought it would be irresponsible to discuss it since doing so could make interrogators and other government officials vulnerable to lawsuits.

"He felt that he could not make that pronouncement without placing people at risk to be sued or perhaps even criminally prosecuted," said Sen. Arlen Specter, the ranking Republican on the Senate Judiciary Committee.

Mukasey, who received a strong endorsement from Schumer, was the White House's first choice to replace Gonzales. Gonzales announced his resignation on Aug. 27, and the White House interviewed Mukasey the same day. Three weeks later, Bush introduced the 66-year-old Mukasey as "a tough but fair judge" and asked the Senate to confirm him quickly.

Mukasey, the former chief U.S. district judge in the Manhattan courthouse just blocks from ground zero, was first appointed to the bench in 1987 by President Ronald Reagan. He also worked for four years as a trial prosecutor in the U.S. Attorney's Office in New York's Southern District — one of the Justice Department's busiest and highest-profile offices in the country.

Mukasey oversaw some of the most significant U.S. terror trials in the years before and after the attacks of Sept. 11, 2001.

He sentenced Omar Abdel Rahman, known as the "blind sheik," to life in prison for a plot to blow up New York City landmarks, and he signed in 2002 the material witness warrant that let the FBI arrest U.S. citizen Jose Padilla. That warrant marked the start of a case that wound its way through several federal courts as the government declared Padilla an enemy combatant and held him for 3 1/2 years before he was convicted last month on terrorism-related charges.

In an opinion article in The Wall Street Journal, Mukasey criticized U.S. national security law as too weak in some areas by noting that prosecutors are sometimes forced to reveal details of cases at the risk of tipping off terrorists. He is also a supporter of the government's anti-terror USA Patriot Act, wryly writing in 2004 that the "awkward name may very well be the worst thing about the statute."

Mukasey, a partner at New York-based law firm Patterson Belknap Webb & Tyler, is also a close friend to former New York Mayor Rudy Giuliani, a Republican. He stepped down as an adviser to Giuliani's presidential campaign, on which he served as part of an advisory committee on judicial nominations.