KABUL - The United States said on Thursday it had shut its last detention facility in Afghanistan and no longer had custody of detainees there, closing a much-criticised chapter in Washington’s fight against extremism.

The US Defence Department said it had recently transferred the last detainees from Bagram Airfield north of the capital, Kabul. It closed the prison there on Dec. 10, a day after a Senate report detailed abuse at a secret CIA prison in Afghanistan.

The US embassy in Kabul said the closure decision was linked to a deadline to end the detention programme in Afghanistan this year, not to the Senate report. “The Government of Afghanistan will be responsible for all detention facilities,” from Jan. 1, an embassy spokesman said.

Foreign prisoners at the various sites in Bagram, often compared to Cuba’s Guantanamo Bay jail, were given no trials, facing only review boards staffed by US military officers. At its peak, the Bagram prison held hundreds of detainees.

A US court found two adult detainees had been beaten to death at Bagram in 2002. The US government said such cases of abuse were rare.

The last few weeks have seen a flurry of transfers from Bagram, including a top Pakistani Taliban militant returned to Pakistan this week. Tunisian detainee Redha al Najar was placed in Afghan custody on Tuesday, his lawyer said.

Najar, one of the longest-serving detainees of the US “war on terror”, was captured as a suspected bodyguard of Osama Bin Laden in May 2002.

He and another Tunisian, who lawyer Tina Foster said was also transferred to Afghan custody, received harsh treatment at a secret CIA facility that the intelligence agency described as a “dungeon” in the Senate report.

Lawyers in Pakistan for some of the detainees said they sought a full list of those who had been moved recently.

Pakistani citizen Kamil Shah, released without trial after five years in US custody in Afghanistan from 2004, when he was 16, said he was beaten by US personnel during his stay in Bagram. “I was in isolation for 11 months,” said Shah, who was among some 2,500 juveniles the United Nations identified as having been detained in Afghanistan, Iraq and Guantanamo Bay by the United States since 2001.

“I wish I could fight a legal case on behalf of all innocent Pakistanis who were in prison and tortured,” Shah told Reuters in Pakistan on Wednesday.

Meanwhile, the US general who brought the NATO coalition’s combat operations in Afghanistan to an end this week after over 13 years of war said Afghan security forces were “inept” at basic motor maintenance and were struggling to sustain troop numbers.

During a final tour of installations, Lt-General Joseph Anderson said that Afghan forces, fighting Taliban insurgents who were ousted from power by US-backed Afghan forces in 2001, struggled with logistics.

“The problem is you don’t have units fixing stuff at their level,” Anderson told Reuters last week, explaining why Afghan commanders often complained they lacked resources to fight.

“This is inept. This is nothing to do with corruption. This is purely ineptitude.”

Another challenge was sustaining troop numbers in face of soaring casualties and defections. Nearly 20 percent of army positions were unfilled as of October.

“Recruiting and retention aren’t matching, and of course don’t forget losses,” Anderson said.

Close to 5,000 Afghan police and army personnel had been killed fighting the Taliban since the start of the year, he added.

Anderson said problems should have been addressed earlier but former president Hamid Karzai had refused to agree to deals allowing some foreign troops to stay beyond 2014. Ghani signed the agreements on his first day in office.