The future of the detention facility on the American naval base at Guantánamo Bay, Cuba, inspires an unusual degree of bipartisan consensus, at least in theory. All three remaining candidates for President, the Republican John McCain and the Democrats Hillary Clinton and Barack Obama, have called for Guantánamo to be closed. So have Condoleezza Rice, the Secretary of State, and Robert M. Gates, the Secretary of Defense; after touring Guantánamo in January, Admiral Mike Mullen, the chairman of the Joint Chiefs of Staff, said, “I’d like to see it shut down.” At a news conference in 2006, President Bush said, “I’d like to close Guantánamo.”

Still, Guantánamo is bustling. Although the number of detainees has fallen from a high of around six hundred and eighty to around two hundred and seventy-five, the base is gearing up for what could become a series of military commissions—criminal trials of detainees. The first is scheduled to begin in May. On a dusty plaza surrounded by barbed wire on an abandoned airfield, contractors are finishing a metal warehouse-type building, which will house a new, highly secure courtroom. On the former runways, more than a hundred semi-permanent tents have been erected, in which lawyers, journalists, and support staffs will work and sleep (six to a tent) during the trials. The tent city has been named Camp Justice. The Bush Administration, instead of closing Guantánamo, is trying to rebrand it—as a successor to Nuremberg rather than as a twin of Abu Ghraib.

The commission trials will be the latest act in a complex legal drama that began shortly after September 11, 2001. A few weeks after the attacks on the World Trade Center and the Pentagon, the United States invaded Afghanistan, and on November 13, 2001, President Bush issued an order establishing military commissions to prosecute war crimes by members and affiliates of Al Qaeda. On January 11, 2002, the first prisoners from Afghanistan reached Guantánamo, which was at the time a sleepy Navy facility used for refuelling Coast Guard vessels. The Bush Administration made it clear that it did not believe that the detainees were entitled to any Geneva-convention protections. Then as now, the Bush Administration asserted that they could be held until the “cessation of hostilities,” meaning not the war in Afghanistan but the “global war on terror”—that is, indefinitely.

From the moment Guantánamo opened, it has been a target of criticism around the world. In 2005, the Amnesty International secretary-general said that “Guantánamo has become the gulag of our times, entrenching the notion that people can be detained without any recourse to the law.” There were allegations of excessively harsh interrogation practices at the detention center in its first years of operation, and the Army’s own reporting has substantiated at least one case of abusive treatment. There have been four apparent suicides at the camp and many more attempts. Even staunch American allies, like Tony Blair, in Great Britain, and Angela Merkel, in Germany, have criticized the facility. As McCain said in 2007, “Guantánamo Bay has become an image throughout the world which has hurt our reputation.” It is that sort of damage, as much as what has gone on at Guantánamo, that has prompted the calls for the closing of the facility.

Administration officials hope that the military commissions will change Guantánamo’s reputation, but that seems unlikely. To date, the commissions have been an abject failure; in more than six years, they have adjudicated just one case—a plea bargain for David Hicks, a former kangaroo skinner from Australia. In March, 2007, after more than five years in custody, he pleaded guilty to “material support to terrorism,” and was sentenced to nine months; he was returned to Australia, where he served out his sentence, and has now been released. Charges have been filed against fifteen detainees, but even if these cases come to trial—and considerable legal obstacles remain—many more prisoners will be left in limbo, without any charges pending against them or any foreseeable prospect of release. As the clatter of construction work shows, it is easier to talk about closing Guantánamo than to do it. Even shuttering it would not settle the most fundamental question raised by this notorious prison: what to do with its inmates. And attempts to resolve that dilemma are increasingly likely to play a role in the Presidential election.

Four times a week, a twelve-seat propeller plane belonging to Air Sunshine, a small airline based in Florida, lands at Guantánamo. The flight from Fort Lauderdale, just three hundred miles away, takes three hours, because the American airliner must avoid Cuban airspace. More than two thousand people work there; most are Navy and Army personnel, and about twelve per cent are civilian contractors. As in many military bases around the world, the local commanders compensate for Guantánamo’s isolation with a kind of hyper-Americanism. There are half a dozen fast-food restaurants, two outdoor movie theatres, miniature golf, and a bedraggled, but playable, nine-hole course. The roads are full of “Gitmo specials”—broken-down heaps that are traded to newcomers by people at the end of their tours.

Heading west from the base’s townlike center, you pass the first of its infamous landmarks—Camp X-Ray. A connected series of open-air cages surrounded by barbed wire, X-Ray was the destination for Guantánamo’s first prisoners. Photographs of these orange-suited detainees, many hunched over in awkward positions, became emblems of the base. The number of prisoners quickly exceeded the capacity of Camp X-Ray, and it was closed in April, 2002. Base leaders have long wanted to tear down the camp, but a federal judge, who is presiding over one of the many pending cases regarding Guantánamo, ordered X-Ray preserved as possible evidence. So the camp remains, filled with trash and overgrown with weeds.

Fifteen minutes farther down the road, overlooking a particularly beautiful rocky beach, is Camp Delta, the prison complex for the remaining detainees. When I first visited Guantánamo, in late 2003, most of the detainees were held in three areas of Camp Delta, Camps 1, 2, and 3, which look like higher-tech versions of Camp X-Ray. The detainees spent their days and nights in open-air cells, which were topped by metal roofs and surrounded by layers of barbed wire. Now, with fewer prisoners, these camps appear almost empty. (The camp authorities will not specify how many people are in each camp.)

About two dozen “highly compliant” prisoners are being held in Camp 4, which features a dusty courtyard in which inmates can move freely during the day and dormitory-style sleeping arrangements. The prisoners in Camp 4 also have access to a small library for books and movies (a National Geographic film about Alaska is popular), and they can take classes to learn to read and write Pashto, Arabic, and English.

The biggest change to Guantánamo has been the completion of Camp 5, in 2005, and Camp 6, the following year. Most of the detainees now reside there. They are modern federal-prison structures, brick-for-brick copies of a pair of existing facilities, one in Terre Haute, Indiana, and the other in Lenawee, Michigan. The scenes inside, for better or worse, resemble those at most Supermax facilities. The prisoners spend about twenty-two hours a day inside climate-controlled, eight-foot-by-twelve-foot cells, with no televisions or radios, and generally leave only for showers or for recreation in small open-air cages.

Painted on the floor of all cells are arrows pointing toward Mecca, and through the cell doors the detainees can hear each other pray five times a day. Each tier of cells appoints a prayer leader who gets a sign—“Imam”—on his door. About two years ago, there were a hundred detainees on hunger strikes demanding an end to their terms, or at least a finite sentence; the number has declined to about ten, although one inmate has been refusing food for more than eight hundred days, and another for nine hundred days. (These prisoners are force-fed twice daily, via a tube through the nose.) Interview rooms for interrogations are outfitted with blue couches for the detainees. Camp 6 had been intended as a medium-security alternative to Camp 5, but after a series of near-riots by the detainees, in 2006, it, too, was converted to maximum-security status. The so-called “high value” defendants are held at Camp 7. This is a secret location at the base and is never shown to reporters.

In a trailer “inside the wire,” adjacent to Camp 4, I spoke with Bruce Vargo, the Army colonel who runs the detention facility. “I think any facility matures over time, and I think that we’ve continued maturing and offering more programs to them, like the library,” he told me. “But they are still very dangerous men, and they take every opportunity they can. There are still assaults that take place weekly on the guards. Every day we have ‘splashings,’ so I made sure the guards have face shields to protect themselves from feces and urine.”

The catchphrase that Vargo and others at Guantánamo often used when describing their work was “safe and humane care and custody.” It was clear, however, that winning hearts and minds is not part of the agenda. “They wouldn’t be the type of people they are without being driven,” Vargo said. “They obviously are very intent on pursuing their cause. They will let you know that this place is just an extension of the battlefield.” He went on, “I would not say that we are building a fan base for the U.S. here. We are keeping bad guys off the battlefield.”

Vargo’s comments reflect the unchanging perspective of the Bush Administration, which holds that these detainees are, in the words of former Secretary of Defense Donald Rumsfeld, “the worst of a very bad lot”—incorrigible soldiers in an unending war. But, in the absence of any meaningful due process, there is no proof that they are. Benjamin Wittes, a fellow at the Brookings Institution, has made a comprehensive review of the prisoners for his forthcoming book, “Law and the Long War.” For a period in 2006 when Camp Delta held about five hundred prisoners, Wittes examined all the available data—including the military’s assertions about the prisoners and any statements that they themselves made—and estimated that about a third of the detainees could reasonably be said to be terrorists or enemy fighters.

The legal battle over Guantánamo has followed a trajectory similar to the political fortunes of the Bush Administration as a whole. The first court challenges by lawyers representing detainees were filed by the Center for Constitutional Rights, the left-leaning legal-advocacy group in New York, and Joseph Margulies, a civil-liberties attorney. Now, however, the anti-Guantánamo cause has gone mainstream, and Air Sunshine flights often ferry attorneys from white-shoe law firms to visit their detained clients. Almost all the remaining detainees who want attorneys are represented by American counsel.

Initially, government lawyers asserted that because the detainees were held outside the United States they had no right to challenge their status in American courtrooms, or even to file writs of habeas corpus. The Presidential order of November 13, 2001, said that the detainees “shall not be privileged to seek any remedy or maintain any proceeding, directly or indirectly . . . in any court of the United States.” But, in 2004, the Supreme Court ruled, in Rasul v. Bush, that, because the Guantánamo base was under the exclusive control of the U.S. military, the detainees were effectively on American soil and had the right to bring habeas-corpus petitions in federal court. As Justice John Paul Stevens said in his opinion, the federal courts “have jurisdiction to determine the legality of the Executive’s potentially indefinite detention of individuals who claim to be wholly innocent of wrongdoing.”

In response to Rasul, the Department of Defense created a Combatant Status Review Tribunal, an administrative proceeding to justify each detainee’s “enemy combatant” status. According to the rules, however, the detainees are not entitled to counsel, are not allowed to see all the evidence against them, and receive only the opportunity to be present and, if they choose, to respond to unclassified charges against them.

These days, the review tribunals are conducted in a windowless double-wide trailer inside the wire, under the supervision of a Navy captain named Ken Garber. These are not trials but a rough cross between grand-jury and probable-cause hearings. Three officers preside over each tribunal, and they can recommend continued detention or transfer to another country. There is only a limited right to appeal, but each detainee receives an annual review of his status in another hearing. “We look at two questions,” Garber told me above the hum of the air-conditioners. “Are they still a threat? Do they still have intelligence value? A yes to either one is enough to keep them.” The tribunals have been widely criticized as one-sided—Eugene R. Fidell, a noted American expert on military law, has called them a “sham”—and, according to Garber, last year only thirteen per cent of the detainees agreed to participate in or attend their own annual review hearings.