By Jessica Donati and Mirwais Harooni
KABUL (Reuters) - Afghanistan on Thursday freed 77 prisoners captured by foreign troops, despite opposition from Britain and NATO-led forces which said they could pose a security threat.
Afghan President Hamid Karzai's government has long complained that foreign forces have locked up many Afghans on dubious grounds and with no proper judicial process. A similar release last month caused tension with the United States.
The latest batch walked free from Bagram prison, which was transferred to Afghan control last year as a milestone in the withdrawal of U.S. and coalition forces from Afghanistan by the end of 2014.
"Insurgents in this group of detainees have caused casualties amongst coalition and Afghan forces," the NATO-led force in Afghanistan said in a statement.
Tim James, a spokesman for the British embassy, said: "We don't agree with the releases." Thirty-nine of those freed on Thursday were captured by British forces.
As they left the jail, prisoners complained about long detention periods without being charged.
"They arrested me without any proof, they have harmed my education and my family," said Mohammad Enam from eastern Nangarhar province, who spent almost a year in Bagram.
Mowlawi Nazar Mohammad, a prisoner from Helmand province, told Reuters he had been threatened. "The British were telling the prisoners on day one after capturing me that: 'We have come here to deal with you and take revenge on you.'"
The Ministry of Defence in London declined to comment.
Last month Afghanistan released 65 detainees that the United States believed were dangerous. The move further damaged relations, already in tatters over Karzai's refusal to allow U.S. troops to stay beyond 2014.
Afghanistan provided a safe haven for al Qaeda and its leader Osama bin Laden, and U.S. and allied forces invaded it soon after the September 11 attacks in 2001.
Karzai has instructed a panel known as the Afghan Review Board to examine the cases of hundreds of prisoners handed over to the Afghan authorities. Most of the approximately 890 under review have already been released on the grounds there is not enough evidence to try them in court.
Abdul Shokor Dadras, head of the panel, said it was in the process of reviewing the cases of a further 48 prisoners arrested around the country, of which 18 had been recommended for further investigation.
(Additional reporting by Reuters TV; Writing by Jessica Donati; Editing by Maria Golovnina and Mark Trevelyan)