A highly respected research organization in Afghanistan has accused the US of gross incompetence over eight Afghans long detained at the Guantánamo Bay detention center.

The “obvious, multiple mistakes” the not-for-profit Afghanistan Analysts Network says the US committed have not only harmed the eight detainees, but have inadvertently provided fuel for the insurgency in Afghanistan, which the US has been unable to suppress after 15 years of war. It is also the latest account to undermine confidence in the US’s assertions that Guantánamo detainees are the war on terrorism’s “worst of the worst”.

The plight of the eight Afghan detainees, as well as a study of the broad detentions the US conducted early in the war, connects two issues the next US president will immediately confront: the future of the Afghanistan war, the longest in US history, and the future of Guantánamo Bay. Both have defied the finality that Barack Obama has either sought or declared.

“For Afghanistan, the mass arbitrary detentions in the early years of the US-led intervention was a major factor in driving some Afghans toward insurgency,” the Afghan Analysts Network found.

Kate Clark, the author of the study, titled Kafka in Cuba, said the legacy of the roundups, and the continued operation of Guantánamo as a detention center, still help drive the conflict.

“They’re still held up by the Taliban, Guantánamo and Bagram, still talked about by the Taliban. There are resonances [with] the Afghan population because of the arbitrary detentions,” Clark told the Guardian.

Six of the eight detainees evaluated by the network arrived at Guantánamo in 2002 and 2003, the dawn of its operations as a detention facility, while the other two arrived in 2007. Five remain in Guantánamo. Wali Mohammed, Abdul Zahir and Bostan Karim await transfer after being recently cleared by a quasi-parole board. The board has ruled against two others, the 2007 arrivals Harun Gul and Muhammad Rahim.

The final three – Obaidullah, Mohammed Kamin and Hamidullah – were transferred to the United Arab Emirates in 2015 and 2016 as part of Obama’s final initiative to reduce the Guantánamo population, which now stands at 60. Afghan nationals, once the largest national proportion at Guantánamo, representing 220 of the 781 men held there, are now nearly all freed from the detention center.

None of the eight men in the study were “accused of carrying out a particular attack”, but were instead accused of having murky connections to terrorist or insurgent groups or financiers. Nor did the Taliban insist on the releases of any of them in the controversial 2014 trade for Sgt Bowe Bergdahl of the US army, a fact which the network believes bolsters the case against their significance in the Afghan insurgency.

At the heart of the US detentions, the network alleges instead, is ignorance. The US relied upon Afghan allies in the early years of the war, who conducted mass roundups, many to settle pre-existing scores. “Almost anyone could be detained,” the network writes, with entire tribes in parts of the country falling victim to their US-backed rivals – a “clear link”, Clark said, to the rise of the Taliban’s insurgent period.

Detainees were said to hold membership in “multiple organizations”, including those with mutually exclusive objectives or disparate tribal memberships. “Such allegations make no sense” on their face, the network states. They suggest that “retroactively” the US had to establish cases against them after the 2004 supreme court case giving Guantánamo detainees the right to contest their detention, in order to conceal that the original mistake of capturing them.

“Meaningless strings of associations – detainee who knew X who knew Y who knew Z who knew bin Laden – are put forward as evidence of wrongdoing. For all eight detainees, raw intelligence reports are routinely relied upon, along with hearsay,” documents purporting to summarize an interrogation, and even torture.

“There is a sense of the US military scraping the barrel to try to justify these detentions,” Clark said.

Military and intelligence ignorance has been compounded by a US legal structure highly deferential to military claims, out of concern about overstepping judicial bounds in wartime. US judges accepted dubious factual claims at face value accordingly. Three of the cases saw the US assert that “the mass, quietist missionary organization, Jamat al-Tabligh, is a front for al-Qaida”, the network found.

Wali Mohammed, for instance, learned in a 2005 non-judicial Guantánamo hearing that he “admitted he was in business with the Taliban”. He replied, according to the transcript: “I didn’t say I did business with the Taliban. I said I did business with the Afghanistan Bank.”

On 26 September, the parole-like board at Guantánamo recommended that detention for Mohammed was “no longer necessary”.

By the same token, US military officials released major Taliban figures from Guantánamo while continuing to detain men who were probably innocent. At least two senior Taliban members, Abdul Qayer Zaker and Abdul Rauf Khadem, returned to Afghanistan in 2007 and eventually found their way back into the insurgency. Another, Shahzada, released in 2003 and killed in battle, is believed to be responsible for civilian massacres.

A Pentagon spokeswoman, Lt Col Valerie Henderson, said: “We are aware of the forthcoming report, but decline the offer to comment.”

Clark’s report does not examine non-Afghan experiences at Guantánamo. But the standards the US has employed for Afghans there, she said, could have led to her own captivity.

“I am one degree from Bush, bin Laden and Mullah Omar,” said Clark. “If I was an Afghan, I could easily have ended up at Guantánamo.”