GUANTANAMO BAY NAVAL BASE—On days when self-described 9/11 attacks mastermind Khalid Sheikh Mohammed appears before the war court, he is removed from his cell at the detention facility here and moved swiftly into an area designated Area of Operations Patriot.

Inside AO Patriot is the so-called Expeditionary Legal Complex and a $3 million courtroom, where pre-trial proceedings for KSM and his co-conspirators have been taking place since 2011. KSM enters the complex through a “Sally Port,” a series of gates designed to allow just one vehicle in at a time. Barbed wire is ubiquitous. The vehicle containing him pulls up alongside five reinforced trailers, holding cells for each of the five charged with conspiring to perpetrate the 2001 attacks.

The cells are austere—essentially hardened trailers—that cost about $40,000 each to build. Inside the small cell, KSM has a television that could show courtroom proceedings, a bed with a sleeping pad, a mirror, toilet, and sink. And an arrow painted on the ground that shows the way to Mecca, for prayers.

When he and his alleged co-conspirators are required to be in court, KSM is ordered to sit on a body-scanning system that’s designed like a chair and scans his body orifices for metal, to ensure he wasn’t passed items while entering or leaving the courtroom. In the context of the recently released CIA “torture report,” this scanner takes on new meaning.

Asked to comment on the scanners in the context of the abuses described in the report, Lt. Col. Sterling Thomas, a lawyer for defendant Ammar al Baluchi, implied that the only things the detainees would have in their bodies were things guards put in them. “I hope they didn’t forget anything they put up there,” he said, a reference to the government’s documented use of rectal hydration and feeding as a means for controlling detainees.

After the scanning takes place, KSM is led down a long corridor flanked by chain-link fences. The fences are themselves covered in black sniper netting, to discourage assassins. As he walks toward the courtroom, he passes a series of rolling restraint chairs, a reminder that detainees will be strapped in them if they choose to resist appearing before the judge as ordered. He also passes a trailer housing the so-called Quick Reaction Force, a team of soldiers that would storm the courtroom if necessary for protection.

But on Monday, when he was scheduled to appear in court, KSM was back in his detention site. The proceedings expected this week in Guantanamo Bay had been canceled. The pre-trial hearings, which have dragged on for three years, were supposed to focus this week on the alleged FBI infiltration of one of the 9/11 five’s defense teams. But a DoJ official in Guantanamo was essentially unprepared to discuss the motion, and the judge put off proceedings until February.

There’s a second reason for the delay in the trial this week, the lawyers for the defendants say: KSM and some of his alleged co-conspirators have refused to be escorted out of their cells by female guards. In particular, KSM objects to being touched by women, who would need to make contact with his hands and shoulder in order to put restraints on his hands and escort him out of his cell.

“It’s a violation of his religion,” argued KSM attorney David Nevin, pointing out that he had been touched only by male guards during extraction over the past several years. “Now, suddenly, it can’t happen any other way, that women have to be touching them.”

With the government and the defense unable to reach an agreement on female guards—who will soon represent some 30 percent of the guard force—KSM has been able to meet with his attorney just once since this issue first arose two months ago.

“These guys are having to choose between meeting with their lawyers, which they have a right to do under the Sixth Amendment, and practicing their religion, which they have the right to do under the First Amendment,” Nevin said.

But the alternative is what is termed a “forced cell extraction,” or as veteran Guantanamo Bay correspondent Carol Rosenberg called it, a “tackle and shackle” procedure. This involves a team of prison guards rushing the cell to violently force a detainee’s compliance. But in the days following the revelations of the CIA torture report, it is not in the government’s interest to have the image of a roughed up KSM in court—nor was it in the defense’s interest to see their client forcibly removed from his cell.

KSM’s treatment at Guantanamo Bay, his lawyer said, has been “cruel, inhuman, and degrading.” Much of the time spent over the past three years in pre-trial proceedings has been on perceived mistreatment. Time has been spent on whether KSM should be given a pillow to sit on while riding from the detention center to court, whether attorney communications have been kept private, and now, his extraction from his cell by female guards.

“My client hasn’t been waterboarded since 2003, but there are many more subtle forms of coercion,” Nevin said.

Despite having been held by the U.S. government since his capture in 2003, KSM hasn’t lost his vanity. He uses a combination of cafeteria ingredients to dye his beard—fruit juices and berries, as well as cumin and turmeric to alter his facial hair to a bright color.

And Janet Hamlin, an AP sketch artist who has drawn KSM in the past, once told NPR that the accused terrorist once complained that she drew his nose all wrong. According to NPR, he apparently told her, “Touch it up.”