WASHINGTON (Reuters) - A former government official criticized for being the principal author of the legal justifications for “enhanced interrogation techniques” was narrowly confirmed by the Senate on Tuesday as the top lawyer for the U.S. Department of Transportation in the Trump administration.

Steven Bradbury, a Washington lawyer at Dechert LLP who was a senior Department of Justice lawyer under President George W. Bush, was criticized by both Republican and Democratic senators before being confirmed by a 50-47 vote.

“Mr. Bradbury’s memos were permission slips to torture,” Republican Senator John McCain, who was a Vietnam War prisoner for 5-1/2 years after his plane was shot down over Hanoi in 1967, said on the Senate floor. “This is a dark, dark chapter in the history of the United States Senate.”

Bradbury, who was nominated to the transportation post by President Donald Trump, defended his work in June before a Senate panel. He said the “questions we addressed raised difficult issues about which reasonable people could disagree” on interrogation techniques and the memos represented his “best judgment of what the law required.”

On Tuesday, Bradbury could not immediately be reached for comment.

Described by the government at the time as “enhanced interrogation techniques,” the methods were used between 2001 and 2006 on detainees held during the Bush administration’s “War on Terror” following the Sept. 11 attacks.

McCain, who was the unsuccessful Republican Party presidential nominee in 2008, said the memos written by Bradbury provided a legal framework for the “inhumane interrogation” of detainees using methods such as “forced nudity and humiliation, facial and abdominal slapping, dietary manipulation” and “more than 48 hours of sleep deprivation.”

Senator Rand Paul, another Republican who opposed Bradbury, said on Twitter “you shouldn’t get to author memos on torturing people & then get another government job.”

Senator Dianne Feinstein, a Democrat, in a separate speech, also criticized Bradbury for what she termed “a troubling history of disregard for United States and international law and seems unable to offer objective legal analysis.”

She said he “helped justify the CIA’s torture program.”

“During a time when we needed independent voices in government to check the CIA’s actions, Bradbury failed to rise to the occasion. He failed to fulfill the responsibilities of his position,” Feinstein said.