GUANTANAMO BAY, Cuba — The architect of the CIA’s enhanced interrogation program sparred on Tuesday with a defense lawyer during a military court appearance in Guantanamo Bay, Cuba.

James Mitchell, a clinical psychologist for the Air Force who designed the harsh interrogation techniques the agency used after 9/11, defended his actions.

Mitchell recounted being asked by CIA officials to design the program, called torture by critics, in June 2002.

“In my mind, there was a genuine threat … and it would be a dereliction of my moral obligation to protect American lives if that was outweighed the temporary discomfort of terrorists who had taken up arms against us … and whatever personal consequences I’d face,” Mitchell said during his first day of testimony in the pretrial hearings for five men accused of plotting the attack that killed more than 3,000 Americans. “I’d get up today and do it again.”

Mitchell, along with Bruce Jessen, formed a company to manage the controversial program and were paid $81 million.

“I never thought of it as a Dr. Mitchell operation, or even as a CIA operation. I thought of it as America’s program,” Mitchell said. “I think the CIA was representing America at the tip of the spear.”

Mitchell, who waterboarded alleged 9/11 mastermind Khalid Sheikh Mohammed and other suspected terrorists, sparred with James Connell, a defense attorney for Mohammed’s nephew, Ammar al Baluchi. Mohammed, Baluchi, and three other charged with plotting 9/11 watched Mitchell’s testimony in the packed court.

Mitchell said he overheard, “The gloves are off,” during his initial April 2002 meeting at the CIA’s Counterterrorism Center, which he thought meant that, following the murder of nearly 3,000 people, the CIA was “intending to do whatever was legal to stop the next attack.”

“Are you going to argue that April 2002 was not right after 9/11?” Mitchell sharply asked Connell. “I saw you roll your eyes.”

“I’m not arguing anything,” Connell replied. “I was just doing the math.”

“I was told there was another catastrophic attack planned by the defendants, possibly involving nuclear weapons,” Mitchell said.

When Connell thanked Mitchell for traveling to Guantanamo Bay, Mitchell fired back.

“I actually did it for the victims and families, not for you,” Mitchell said.

Mitchell said he ignored Connell’s outreach prior to the hearing because he "assumed [Connell] had an agenda."

“You folks have been saying untrue and malicious things about me and Dr. Jessen for years, so you shouldn’t be surprised I didn’t want to spend a lot of time with you,” he said.

Mitchell said there was a distinction between how the FBI and the CIA approached captured terrorists.

“The CIA was never interested in prosecuting — the CIA was not going to let another catastrophic attack go off,” he said. “They were going to walk up to the line of what was legal, put their toes on it, and lean forward.”

Connell told the judge that, although Mitchell is often portrayed as the face of the program, it was an institutional program and he is not a rogue actor.

“This whole effort to extract information from these detainees was an interagency and governmentwide effort,” the defense lawyer said.

“I didn’t stop to think about whether it was a full government effort … or about food fighting between the FBI and CIA,” Mitchell said. “My sole focus was on stopping the next attack.”

But Mitchell distanced himself from the authorization of these techniques, drawing a distinction between government contractors, or “green badgers," and federal employees, who are “blue badgers.”

“I was a green badger,” he said. “Green badgers don’t run the CIA. Blue badgers do.”