AP photo, Brennan Linsley, Pool
In this image reviewed by the U.S. Military, part of a legal defense team walk at Camp Justice, part of the legal complex of the U.S. Military Commissions, at Guantanamo Bay U.S. Naval Base, Cuba, Thursday.

GUANTANAMO BAY NAVAL BASE, Cuba — Khalid Sheikh Mohammed, appearing for the first time since his capture five years ago, said he would welcome becoming a "marytr" after a judge warned Thursday that he faces the death penalty for his confessed role as mastermind of the Sept. 11 terrorist attacks.

Wearing thick glasses and occasionally fussing with his turban or stroking his bushy gray beard, Mohammed seemed noticeably thinner than the image of a slovenly man with disheveled hair, an unshaven face and a T-shirt that the U.S. showed to the world after his capture in Pakistan.

Mohammed chanted verses from the Quran, rejected his attorneys and told Judge Ralph Kohlmann, a Marine colonel, that he wants to represent himself at the war crimes trial.

The judge warned that he faces execution if convicted of organizing the attacks on America. But the former No. 3 leader of al-Qaida was insistent.

"Yes, this is what I wish, to be a martyr for a long time," Mohammed declared. "I will, God willing, have this, by you."

Mohammed and his four alleged co-conspirators each face death if convicted of war crimes including murder, conspiracy, attacking civilians and terrorism by hijacking planes to attack U.S. landmarks. The murder charges involve the deaths of 2,973 people at the World Trade Center, Pentagon and a field in Pennsylvania where passengers forced down their plane.

Their arraignment begins the highest-profile test yet of the military's tribunal system, which faces an uncertain future. The Supreme Court is to rule this month on the rights of Guantanamo prisoners, potentially delaying or halting the proceedings.

The trial also carries some strategic risk, and the military is trying to minimize the chance that classified information that would endanger Americans will come out, including delaying closed-circuit video of the proceedings by 20 seconds.

Mohammed seemed calm for the most part, but became upset and denounced the tribunals as unfair after the judge told defense lawyers to be quiet and "sit down!"

"It's an inquisition. It's not a trial," Mohammed said, his voice rising. "After torturing they transfer us to inquisition land in Guantanamo."

The five men, sitting at separate tables, spoke with each other in Arabic, appeared to pass notes to each other and at one point looked back and chuckled at reporters watching from behind a courtroom window.

None wore handcuffs, but the ankles of Ramzi Binalshibh, said to have been the main intermediary between the hijackers and al-Qaida leaders, were shackled to the courtroom floor.

All appeared to be in robust health except for Mustafa Ahmad al-Hawsawi, who allegedly selected and trained some of the 19 hijackers. He looked thin and frail and sat on a pillow on his chair.

Calmly propping his glasses on his turban to peer at legal papers, Mohammed grinned at times and insisted that he would not be represented by any attorneys. He told the judge he "can only accept Sharia law."

"There is no God but him, in him I have put my trust," Mohammed chanted before Kohlmann asked him to stop.

Mohammed was repeatedly interrogated by the CIA at secret sites before he was transferred to the U.S. Navy base in Guantanamo Bay, Cuba, in 2006. His defense has said he may have suffered cognitive impairment from the interrogations, which according to the Bush administration included waterboarding, a technique creates the sensation of drowning by strapping a person down and pouring water over his or her cloth-covered face.

Mohammed told the judge he understands there are certain subjects he should not bring up in court, but said the Quran should be within the "green line," or permitted.

"I can't mention about the torturing," Mohammed added in broken English. "I know this is the red line."

Military commissions have been conducted since George Washington used them after the end of the Revolutionary War, but this is the first time the United States has used them during an ongoing conflict, said Air Force Brig. Gen. Tom Hartmann, a top tribunal official.

The Supreme Court struck down the commissions as unconstitutional in 2006. Congress then altered and resurrected them, but they have remained mired in confusion over courtroom rules and dogged by delays and appeals.

Army Col. Steve David, chief defense counsel for the tribunals, called the process "fundamentally flawed."

"We will zealously identify and expose each and every (flaw)," Davis said Wednesday.

The defense attorneys have accused the U.S. of rushing the trial to influence this year's presidential elections. They recently asked Kohlmann to dismiss the case and remove Hartmann, who was accused of political meddling by a former chief prosecutor for the tribunals.

Hartmann has insisted the trials will be fair, and said he has not been asked to recuse himself from the upcoming trial.

The other defendants are: Ali Abd al-Aziz Ali, known as Ammar al-Baluchi, a nephew and lieutenant of Mohammed; and Waleed bin Attash, who allegedly selected and trained some of the 19 hijackers who turned airplanes into missiles in the attacks.

About 35 journalists watched on closed-circuit TV in a press room inside a converted hangar, while two-dozen others watched through a window from a room adjacent to the courtroom. No photographs were allowed inside the courtroom, but a sketch artist was allowed to draw the scene.

Among the very few observers allowed inside the courtroom were Fang A. Wong, a senior member of the American Legion post closest to Ground Zero in New York, who said "I have been waiting for this for a long time."

With less than eight months remaining in U.S. President George W. Bush's term, presidential candidates Barack Obama and John McCain both say they want to close the military's offshore detention center.

Obama also opposed the Military Commissions Act that in 2006 resurrected the military commissions, but McCain supported it.

The modular courtroom can be taken down and "sent to Fort Bragg, Fort Lewis, or any installation that needs a big courtroom," said Army Col. Wendy Kelly.