A defiant Sen. John McCain (R-AZ) on Tuesday delivered an impassioned rebuke of President Donald Trump’s nominee to be the general counsel of the Department of Transportation, Steven Bradbury, citing Bradbury’s efforts to devise a legal justification for the United States’ use of torture during the George W. Bush administration.

“Of the years that I have been here, I never thought that we would be considering the nomination of a person who supported the commission of what the Geneva Conventions says is war crimes. That is a serious, serious issue,” McCain said in a seething speech on the Senate floor. “I am astonished that we are here considering the nomination of a person who is in violation of the Geneva Convention rules of war, to which the United States of America is a signatory.”

Bradbury, whose nomination was sent to the Senate in June, served as the acting chief of the Justice Department’s Office of Legal Counsel from 2005 to 2009. During his tenure, he authored the so-called torture memos, which acted as the legal basis for the CIA to employ certain torture methods against suspected terrorists. McCain said those memos amounted to “permission slips for torture.” He went off-script at certain points to emphasize his deep-rooted opposition to torture and, in turn, to Bradbury’s nomination.

“I would challenge Mr. Bradbury to go through 48 hours of sleep deprivation before he signs off on another memo,” the Arizona senator said in condemning that practice. “Sometimes I wonder—I wonder if someone who’s responsible for what he justifies—I wonder how you sleep. I wonder how you get rest. Doesn’t the face of that person who’s been deprived of sleep for 48 hours ever pop into your mind?”

McCain was diagnosed with brain cancer in July and received treatment earlier this month for a minor Achilles tear. Despite those medical obstacles, McCain has continued his work in the Senate at a dizzying pace, and addressed the chamber on Tuesday with the same defiance on the issue as he has in years past.

The Arizona senator has long opposed the use of so-called enhanced interrogation techniques. He was held as a prisoner of war in Vietnam for nearly six years and was subjected to torture himself. As he battles more recent medical issues, McCain’s hands were shaking as he shuffled his papers at the lectern. He currently requires a cane and a medical boot to walk. But none of those were obstacles as McCain spoke on a subject that often leaves him out of step with his own party.

“The laws of war were carefully created to be precise and technical in nature—but also to leave room for interpretation, even at the risk of abuse, by the executive branch,” he added. “This makes the duty of government lawyers all the more significant. They must serve as guardians of our ideals and our obligations under international law.”

McCain, who serves as the chairman of the Senate Armed Services Committee and therefore wields immense power over nominees to key defense and national security positions, vowed last week to oppose any Trump nominee who has supported torture.

“We have led by example and sacrificed blood and treasure to advance our ideals around the world, only to undermine our good reputation in a crucible in which we allowed fears to get the better of our decency,” McCain said in a direct appeal to his fellow senators.

“Mr. Bradbury’s work many years ago did a disservice to our nation and its defenders,” he added. “I cannot in good conscience vote to give him my trust to serve us again.”

But McCain’s plea to his colleagues was not enough. In a Tuesday afternoon roll call vote, the Senate voted narrowly to approve Bradbury’s nomination, 50 to 47. Perhaps a harbinger of the outcome, the chamber was nearly empty throughout the duration of McCain’s speech. Sen. Chuck Grassley (R-IA) walked into the chamber about halfway through the address, watched McCain for 15 seconds, and left.

“This is a dark, dark chapter in the history of the United States Senate,” McCain concluded. “We are harming the commitment that our forefathers made that we are all created equal. And unfortunately we have now betrayed that sacred trust.”