Khan is among the youngest "war-on-terror" prisoners held by the Americans in Bagram or Guantanamo Bay, Cuba. Lieutenant-Colonel Valerie Henderson, a Defense Department spokeswoman, told Al Jazeera that "we believe" Khan was 18 when captured, and he was held as "a law of war detainee".

While as a Bagram prisoner Khan had even fewer rights than his counterparts in Guantanamo, his transfer - and that of other Pakistanis like him - took place with little political pushback, something that has plagued US President Barack Obama who, with just months left in office, is still trying to get out of the detention business.

Afghan government releases Bagram inmates

By the end of 2014, 43 known Pakistani prisoners held by the US at Bagram were repatriated - all are reported to have been initially detained at still-undisclosed locations upon arrival in Pakistan, according to Justice Project Pakistan (JPP), which wants the US and Pakistani governments to provide assistance for their rehabilitation and reintegration.

They've so far received nothing despite years of detention without charge, JPP said.

At first, then 14-year-old Khan said he was isolated in a single cage in Bagram. Then he joined other inmates, somewhere between five and seven men, in "bigger cages" at the US detention centre - where American jailers killed at least two men - without access to counsel.

Khan said simply, "yes," five years and a few months is "a long time" to be held. Sometimes, though, he could see distant mountain peaks "covered with snow".

Then one day, Khan was sent home to Pakistan - released wearing white prison garb with his detention number 3718 written on his shirt. He got his cell phone back, but the US army burned his original clothes.

Bagram and action by Pakistan

As the US was readying to relinquish its control of Bagram prison, known now as Detention Facility in Parwan, to Afghan security forces in December 2014, Washington worked to rid itself of third-party nationals, the majority of whom were Pakistani.

Years earlier in October 2010, JPP, a non-profit human rights law firm, began litigation seeking the repatriation of Pakistani nationals held by the US by filing a petition in the Lahore High Court.

The Pakistani case progressed on October 20, 2011, when the court ordered the Pakistani government to visit the US prison and to find out more about the Pakistani citizens who were being held by the Americans.

Before this visit, the Pakistani government had been to Bagram only once before, according to JPP. Rather quickly, by January 20, 2012, Justice Khalid Mehmood Khan found there were no serious allegations against seven of the men and by May 28, he ordered the government to confirm the identities of all the men being held.

Some of the Pakistani men may have had links to al-Qaeda or like-minded Pakistani groups; others were wrongly accused or simply seemed to be in the wrong place at the wrong time. However, none was ever charged with a crime.

The US Department of Defense maintains all detainees were "treated humanely".

Kafkaesque

The US hands over control of Bagram's Parwan jail

Many of these Pakistani men have reported that while they were held by the US, a Bagram Detainee Review Board (DRB) found them "innocent" and told them they did not need to be imprisoned. But the US military and/or State Department did not approve or facilitate their transfers or releases, JPP said.

The Pakistani men, therefore, continued to have DRB hearings about every six months regardless of whether they were previously recommended for release or not.

The International Committee of the Red Cross facilitated phone calls between the prisoners and their families, but the detained men were never permitted to discuss the condition of their imprisonment or their cases.

In August 2012, two Pakistani prisoners were repatriated followed by six more men in November 2013. By the end of 2014, all 43 known prisoners were home. JPP said it never received documentation confirming the total number of Pakistani prisoners held in Bagram, nor confirmation that all nationals were repatriated.

The current Bagram population under Afghan control includes some 141 foreign nationals, most of them Pakistani, according to the Afghan defence ministry.

JPP is also helping former prisoner 1432 Amanatullah Ali, a rice merchant who supported his five young children. He travelled for business to Iran in 2003 and then went to Iraq to visit religious shrines, but he never returned home. Ten months later his family found out he was in Bagram, via a letter from the ICRC.

Ali had been staying in a place for pilgrims in Iraq when "the British started firing at us", he said in a video recorded by JPP. "There were British badges on their shoulders."

It is still not clear who originally took Ali, but it was British forces in Iraq who handed him off to the Americans, who rendered him to Bagram, according to his account and that of a former lawyer of his.

The Americans "did things to me that I cannot describe", Ali recounts in the JPP video about his introduction to Bagram, where he would spend some 10 years and seven months. Sometime during his detention, his shoulder was damaged when he said US soldiers dragged him. He hurt his back, too, in a fall, which prevented him from returning to work when he was released.

His brother died when he was in Bagram and the "responsibility of his family also came on to my family". But Ali can do little now and said he was a burden on his family.

The stories of former prisoners 2096 Awal Noor, a goat herder, who disappeared in the summer of 2006 at age 16; and3764 Shoiab Ahmed, a father of three, are similar. Their families told JPP the men just vanished one day only to resurface in Bagram.

The families of former detainees 2422 Umran Khan, one of 10 children, and 2421 Mohammad Riaz believe these men were sold by unknown individuals to US forces who threw them into Bagram.

Freedom for these former Bagram prisoners, however, has brought many of the Pakistani men little else, according to JPP. Most report being told they would be compensated upon repatriation - but this has not happened.

Upon the release of Khan, who spent his teenage years in US custody, American officials said: "We're sorry", he recalled. "We could not establish any link [between] you [and] bad guys."