Twenty years after the September 11 attacks, the US "war on terror" is still being fought on a piece of hilly scrubland in southeast Cuba known as Guantanamo Bay.

Within months of the attacks, the United States rounded up hundreds of people with suspected ties to perpetrator Al-Qaeda and dropped them in the US naval base.

They were labeled "enemy combatants" without rights; the only timeframe for their release, if ever, said then-vice president Dick Cheney, was "the end of the war on terror" -- which, officially, is still ongoing.

Now, most of the 780 suspects who were locked in cages and bare cells have been freed, often after more than a decade without being charged.

Today, 39 remain, some promised a release that never materialized, some hoping for it, and 12 whom Washington regards as dangerous Al-Qaeda figures, including Khalid Sheikh Mohammed, the alleged mastermind of the 9/11 plot.

Some of the first detainees at Guantanamo in January 2002
Some of the first detainees at Guantanamo in January 2002 REUTERS POOL / KEVIN LAMARQUE

Under President Joe Biden, their trials have resumed after a delay caused mainly by the Covid-19 pandemic.

On September 7, after a 17-month pause, the pre-trial hearings for Mohammed and four others are set to resume, just days ahead of the anniversary of the attack.

But there is no certainty that a verdict will be handed down for the five by the attack's 21st anniversary next year, or the following year.

Guantanamo detainees prepare for the evening prayer in March 2002
Guantanamo detainees prepare for the evening prayer in March 2002 AFP / PETER MUHLY

The military commissions system overseeing the 12 accused Al-Qaeda figures has proven chaotic, unwieldy and often contrary to US law, to the point that in 20 years, only two have been convicted.

Benjamin Farley, a Defense Department lawyer representing one of the five in the 9/11 trial, called the commissions "an expensive and failed experiment in ad hoc justice."

Marred by accusations the government has withheld and falsified evidence, and wiretapped defense attorneys, the biggest cloud hanging over the cases is that defendants say they were brutally tortured by their captors, tainting the prosecution.

"I think everyone on all sides knows the commissions are a failure," said Shayana Kadidal of the Center for Constitutional Rights.

The problems are such that the 10 could spend the rest of their lives in Guantanamo, she told AFP.

A picture posted on the website www.muslm.net on September 3, 2009 purports to show Al-Qaeda's Khalid Sheikh Mohammed, alleged organiser of the September 11, 2001 attacks at the Guantanamo Bay detention camp
A picture posted on the website www.muslm.net on September 3, 2009 purports to show Al-Qaeda's Khalid Sheikh Mohammed, alleged organiser of the September 11, 2001 attacks at the Guantanamo Bay detention camp MUSLM.NET

Guantanamo has proven both a headache and an embarrassment for the US government, drawing charges of sweeping human rights abuses from around the world.

Isolated on a rocky coastline miles from the main Guantanamo naval base, the facility was rooted in the CIA's notorious operation to seize Al-Qaeda suspects for secret rendition to its "black sites" scattered around the world.

There, they underwent intense interrogation and torture, including waterboarding, that continued for days, weeks and even years.

Then they were brought to Guantanamo, where the government of Republican George W. Bush decided they had no rights, under US law or the Geneva Conventions.

From the first 20 detainees in January 2002, their numbers ballooned to 780.

But reviews showed the government had no evidence to tie many to Al-Qaeda or 9/11, and they were quietly released -- though for some that took a decade.

When Democrat Barack Obama became president in January 2009, there were about 240 still in custody.

Not only was the prison a human rights embarrassment and what one Obama official called a "propaganda tool" for violent jihadists, there was evidence to suggest three detainees had been killed one night in 2006 by interrogators, who claimed the deaths were coordinated suicides.

One of Obama's first actions was to order Guantanamo to be closed within a year. But Republicans in Congress blocked the closure, leaving the detainees in legal limbo.

Obama, nevertheless, pushed to release most of the detainees, and only 41 were left when Donald Trump took office in January 2017.

But instead of continuing the releases, Trump froze them and threatened to fill more Guantanamo cells with Islamic State fighters captured in Iraq and Syria.

Biden, who was Obama's vice president, has favored closing the prison. But analysts say he is not going to copy Obama's move, knowing it could be politically disastrous.

Instead, with the Covid-19 threat having eased with vaccinations, the military commissions resumed hearings in May and Biden has sought to quietly release those not facing trial.