But his lawyers say he cannot. They say Mr. Hamdan has essentially been driven crazy by solitary confinement in an 8-foot-by-12-foot cell where he spends at least 22 hours a day, goes to the bathroom and eats all his meals. His defense team says he is suicidal, hears voices, has flashbacks, talks to himself and says the restrictions of Guantánamo “boil his mind.”

“He will shout at us,” said his military defense lawyer, Lt. Cmdr. Brian L. Mizer. “He will bang his fists on the table.”

His lawyers have asked a military judge to stop his case until Mr. Hamdan is placed in less restrictive conditions at Guantánamo, saying he cannot get a fair trial if he cannot focus on defending himself. The judge is to hear arguments as soon as Monday on whether he has the power to consider the claim.

Critics have long asserted that Guantánamo’s climate-controlled isolation is a breeding ground for madness. But turning that into a legal claim marks a new stage for the military commissions at Guantánamo. As military prosecutors push to get trials under way, they are being met with challenges not just to the charges, but to Guantánamo itself.

Pentagon officials say that Guantánamo holds dangerous men humanely and that there is no unusual quantity of mental illness there. Guantánamo, a military spokeswoman said, does not have solitary confinement, only “single-occupancy cells.”

In response to questions, Cmdr. Pauline A. Storum, the spokeswoman for Guantánamo, asserted that detainees were much healthier psychologically than the population in American prisons. Commander Storum said about 10 percent could be found mentally ill, compared, she said with data showing that more than half of inmates in American correctional institutions had mental health problems.

With their filings, Mr. Hamdan’s lawyers are setting the stage for similar challenges to the procedures of Guantánamo in some 80 expected war crimes cases, lawyers for other detainees say. “The issue of mistreatment of prisoners, the miserable lives they live in these cells, will come up in every case,” said Clive Stafford Smith, a lawyer for 35 detainees.

The case of Salim Hamdan is already a landmark because the Supreme Court used an earlier case against him to strike down the Bush administration’s first military commission system in 2006. But that case, like most of the legal battles over Guantánamo, did not affect conditions there.

Detainees lawyers argue that the effects of intense isolation have gradually turned the prison camp into something of a highly fortified mental ward. Mr. Hamdan’s lawyers say his place as one of the best-known detainees has not spared him.

In more than six years of detention, Mr. Hamdan has had two phone calls to his family and no visits. He has been disciplined, legal filings say, for having a Snickers bar that was given to him by his lawyers and for possessing too many socks.

“Conditions are asphalt, excrement and worse,” he wrote his lawyers in February. “Why, why, why?”

At Guantánamo, there are no family visits, no televisions and no radios. A new policy will for the first time permit one telephone call a year.

In the cells where Mr. Hamdan and more than 200 of Guantánamo’s 280 detainees are held, communication with other detainees is generally by shouting through the slit in the door used for the delivery of meals. Mail is late and often censored, lawyers say.

Conditions are more isolating than many death rows and maximum-security prisons in the United States, said Jules Lobel, a law professor at the University of Pittsburgh who is an expert on American prison conditions.

The military prosecutors declined to comment on the claims about Mr. Hamdan’s condition. As is common at Guantánamo, their legal filings were not made public before the scheduled court date. But defense filings released by Mr. Hamdan’s lawyers recited some prosecution arguments.

The prosecutors argued that the way that Mr. Hamdan was being held did not constitute solitary confinement in part because “detainees can communicate through the walls.” They said that Mr. Hamdan had denied having mental problems and that he was no model detainee, spitting at guards, threatening assault and throwing urine.

Speaking generally, Commander Storum said, detainees are enemy combatants held safely. “We are holding the right people,” she added, “in the right place, for the right reasons, and doing it the right way.”

Prosecutors have said Mr. Hamdan, now about 39, helped Mr. bin Laden elude capture after the 2001 terror attacks. He is charged with transporting weapons for Al Qaeda and being a bin Laden bodyguard and driver.

In recent weeks, his case has drawn wide notice because the defense asserted that senior Pentagon officials exerted improper influence over military prosecutors and pressed cases for political reasons. Hearings on that issue, also scheduled for next week, may expose the internal workings of the military commissions. The former chief Guantánamo prosecutor, Col. Morris D. Davis, who has become a critic of the way the war crimes system is run, is slated to testify for Mr. Hamdan.

But the claim about Mr. Hamdan’s mental health could expose the workings of Guantánamo. According to military statistics, three-quarters of the detainees have been held recently in two “camps” that look much like American prisons. Camp 5 and Camp 6, heavily guarded concrete buildings, hold men who have yet to face trial. Behind a heavy door, each cell has a handful of sanctioned items including a cup and a Koran.

Officials concede that the daily two hours of recreation in a chain-link pen is sometimes offered in the dark. From inside their cells, detainees cannot see the outdoors. From the exercise pens they sometimes can see only a sliver of sky.

Michael E. Mone Jr., a Boston lawyer, visited a client last month in Camp 5, where Mr. Hamdan is held. Mr. Mone said his client, an Uzbek detainee, asked why he could not be held in a place where he could see the sun.

This winter, lawyers for Abdulghappar Turkistani, a detainee in Camp 6, received a letter describing life there. “Losing any contact with anyone,” he wrote, “also being forbidden from the natural sunlight, natural air, being surrounded with a metal box all around is not suitable for a human being.”

Reporters are not permitted to interview detainees, and some international groups, like Amnesty International, have been denied access to detainees.

In leaked reports in 2004 investigators for the International Committee of the Red Cross, who do see detainees, said their treatment, including solitary confinement, amounted to torture. But the Red Cross usually keeps its conclusions private.

As a result, much of what is known about current conditions at Guantánamo comes from lawyers, who visit regularly under tight restrictions. Many describe the men as depressed or delusional. Some, they say, show obvious signs of what some of them call Guantánamo psychosis.

Four detainees are believed to have committed suicide in 2006 and 2007, but the military has never released the official details.

Some of the men are increasingly paranoid and some are losing touch with reality, said Rebecca P. Dick, a Washington lawyer who visited two Afghan detainees in March. “One client said, ‘I’m talking to the ceiling now,’ ” Ms. Dick recalled.

Six detainees, according to military officials, are now on hunger strikes. They are fed liquid nutrition through tubes inserted in their nostrils daily.

Photo

Lt. Cmdr. Brian L. Mizer, a military lawyer, says his client, Mr. Hamdan, wants out of confinement in Camp 5 at Guantánamo, but refuses to help in preparations for his case.Credit
Doug Mills/The New York Times

Mr. Stafford Smith said one of his clients, a hunger striker, was fixated on a mathematical formula that he believed proves that he will be the next to die.

Another detainee, Mr. Stafford Smith said, has smeared feces on his cell walls. “When I asked him why he was doing it, he told me he had no idea,” Mr. Stafford Smith said.

Last month a lawyer for nine detainees who are members of China’s Uighur ethnic minority told a Congressional committee that one of them, Huzaifa Parhat, said that life at Guantánamo was like having already died. The lawyer, P. Sabin Willett, said Mr. Parhat asked the lawyers to pass on a message. He told them to tell his wife to remarry.

Military officials often dismiss such descriptions as accounts by gullible lawyers manipulated by terrorists trained to make false claims of mistreatment.

Detainees’ lawyers say the military methodically understates the mental illness at Guantánamo for public relations reasons.

In military commission proceedings in recent weeks, there have been hints that some of the men facing charges may be deteriorating psychologically.

A military lawyer for a Sudanese detainee said her client appeared frantic and asked that he be evaluated.

When a judge asked a Saudi detainee the name of a lawyer, the detainee’s answer was: “I have been here for six years. Thank God I can even still remember the names of my own family.”

But Mr. Hamdan’s case is the first in the current system to try to air fully the claim that Guantánamo is warping the minds of the men held there.

Commander Mizer said Mr. Hamdan talked unendingly about his desire to moved to Camp 4, the only place at Guantánamo where detainees are permitted to live communally. Camp 4 is believed to house 50 or fewer detainees who officials classify as highly compliant. Mr. Hamdan blames his lawyers for failing to get him out of Camp 5, Commander Mizer said, and will talk only about that. “He refuses to talk about his case,” he said.

The trial is now set to begin on May 28. But twice in recent months, Commander Mizer said, Mr. Hamdan has said he was dismissing Commander Mizer from the case. “He said, ‘I don’t ever want to see you again,’ ” Commander Mizer said.

There is only one subject, he said, that Mr. Hamdan discusses: Getting out of his cell in Camp 5 at Guantánamo Bay.

A version of this article appears in print on , on Page A1 of the New York edition with the headline: Detainees’ Mental Health Is Latest Legal Battle. Order Reprints|Today's Paper|Subscribe