The former chief US prosecutor at Guantanamo Bay has denounced the military trial of Khalid Sheikh Mohammed, the alleged mastermind of the 9/11 attacks due to appear in court at Guantanamo on Saturday, as intended primarily to prevent the defendants from presenting evidence of torture.

Morris Davis, a former colonel who was chief prosecutor when Mohammed was brought to Guantanamo in 2006, said the military commissions will be badly discredited by the use of testimony obtained from waterboarding and other "enhanced interrogation" techniques used on the accused men.

Mohammed and his four co-accused – Ramzi bin al-Shibh, Ali Abd al-Aziz Ali, Mustafa Ahmed al-Hawsawi and Walid bin Attash – are to appear at an arraignment hearing before a military commission to plead to charges of 2,976 counts of murder for each of the victims who died on 9/11, terrorism, hijacking, conspiracy and destruction of property. The prosecution is seeking the death penalty for all of the men.

Morris Davis resigned as Guantanamo prosecutor. Photograph: AP

Davis, who resigned over the issue, wanted to see Barack Obama follow through on a commitment to move the trials to more open civilian courts but said that advocates of military tribunals prevailed in large part because the rules of evidence prevent the defendants from giving detailed descriptions of how they were tortured as well as other sensitive information such as details of the CIA's secret detention programme and the co-operation of foreign countries, such as Britain, in their capture and interrogations.

"The truth is the reason the apologists want a second-rate military commission option is because of what we did to the detainees, not because of what the detainees did to us," he told the Guardian. "If you look beneath the layers on why there's even an argument for military commissions, it's really about our mistreatment of detainees – a fairly small number of people for a short period of time that because of what most people would call torture, it makes it a greater challenge to prosecute the cases in our regular courts."

Other senior military lawyers have objected to the trials, including Rear Admiral Donald Guter, the former judge advocate general of the navy, who called the Guantanamo commissions a "circus".

Second trial for Mohammed

This weekend's hearing will be the second attempt to try Mohammed. At a similar hearing in 2008, he tried to plead guilty, saying he wanted to be put to death as a martyr, but the US supreme court later struck down the rules of evidence and the trial was called off.

At the time, Mohammed said: "After torturing, they transferred us to inquisition land in Guantanamo."

Obama came to power a year later promising to scrap the military tribunals and close the Guantanamo prison because they were "a symbol that helped al-Qaida recruit terrorists to its cause", but Congress blocked the move.

The president did oversee important changes to the conduct of the military trials including new rules that do not allow a defendant's own confessions under torture to be used against him. But the statements of others who were tortured can be used which permits the interrogations of the five accused to be used against each other.

The military tribunal rules also forbid discussion of torture and other sensitive information that would be heard in a civilian court. The public and press are kept behind a glass screen at Guantanamo and the proceedings they hear are subject to a 40-second delay so censors can block testimony the government does not want made public.

The five accused were held incommunicado for several years by the CIA which subjected Mohammed to waterboarding 183 times. Other forms of torture used against the men, with legal cover from the Bush administration, included being made to stand naked for days at a time, beatings, being smashed against walls, threats of rape and sleep deprivation.

The International Red Cross described the conditions as inducing "severe physical and mental pain and suffering, with the aim of obtaining compliance and extracting information".

Human rights groups have also criticised the Guantanamo tribunals because the military gets to hand pick the judge and jury, which is made up of men and women serving in the forces fighting al-Qaida. The prosecution has considerable control over defence lawyers' access to evidence and ability to subpoena witnesses.

Davis said the trials will be discredited in the eyes of much of the world.

"My greatest concern is that we give a stamp of approval to this second rate process that in the future, if the shoe's ever on the other foot, if an American GI or citizen are being prosecuted in a second rate procedure somewhere else around the world, we've given up the moral argument that it's inadequate," he said.

"In January, you had an American citizen, Amir Hekmati, convicted in an Iranian court and sentenced to death. Victoria Nuland of our state department in a press conference condemned the conviction and said the procedure was not the same as Iranian citizens get, there was secret proceeding, there was coerced evidence, there was inadequate defence. I'm listening to her talking and I'm thinking that sounds an awful lot like the military commissions in Guantanamo. I think we really give up the right to object when other people do what we're doing."

Lawyers for the defendants are sceptical

The trial faces a barrage of criticism from other quarters. Kenneth Roth, the director of Human Rights Watch, said it will not have credibility.

"The victims of the horrific 9/11 attacks deserve justice, but using a tribunal that allows coerced evidence will never be seen as fair," he said. "By doing so, President Obama has both compromised prospects for a credible trial and undermined inquiry into Bush-era interrogation practices. That is a gift to terrorist recruiters and a danger to US security."

The US administration has defended the reconfigured military commissions by saying they are much more open than before, including now permitting the defendants to have civilian lawyers. The new rules also offer protections against self-incrimination, ex post facto laws, double jeopardy and introduce a right of appeal.

The chief military prosecutor, Brigadier General Mark Martins, urged critics to give the tribunal a chance.

"If observers will withhold judgment for a time the system they see will prove itself deserving of public confidence," he said at Harvard law school last month.

But some of the lawyers for the defendants are sceptical.

"You can take a $5 mule and put a $10,000 saddle on it and call it reformed," said Commander Walter Ruiz, a military lawyer for al-Hawsawi. "You still have a $5 mule. It just has a fancy saddle."

'We've screwed this process up for so long'

Davis was chief military prosecutor when Mohammed arrived at Guantanamo in 2006.

"He's such an arrogant guy that we joked about charging his co-accused as capital cases eligible for the death penalty but not him. We thought it would aggravate the hell out of him that we thought somebody was more important than he was. It would really offend him that somebody else got the death penalty and he didn't, they were a bigger player than him," he said.

"That's what he wants. He wants to be a martyr. His trial is his last chance to stand up and address the world, and then he wants to be executed and be a martyr. My view is why give him what he wants? His view of hell would be a long and healthy life spent being totally irrelevant."

But a year later, Davis said he turned against the military commissions because he was being pressured to use evidence obtained through torture.

"For nearly two years I was the leading advocate for military commissions and for Guantanamo. I honestly believed that we were committed to having full fair and open trials," he said.

Davis said that it was originally agreed that no statements tainted by torture would be used but that changes among more senior officers led to a shift in policy.

"My immediate boss who came in in the summer of '07 said: President Bush said we don't torture, so if the president says we don't torture who are you to say we do? We've got all this information we collected using these techniques so you need to use it," he said.

"It's really ironic. When KSM was arraigned in 2008, he said he wanted to plead guilty, he wanted to stand up and tell what he did, and he wanted to be executed and be a martyr for the cause. Then you've got the prosecution who want to convict him for what he did, establish what he did, and then execute him for what he did. The two sides are in agreement about what they want to do. It's how do you get there? We've screwed this process up for so long that I just don't think there's any way to rehabilitate the evidence of a military commission where the world's going to look at it and say that's a credible and fair process."