About 80 prisoners held by the US military in Afghanistan have been released, Afghan officials say.
The US is holding about 500 people at its bases in Afghanistan
They were among suspects held after the fall of the Taleban in 2001.
A spokesman for President Hamid Karzai said the prisoners had been transferred to Kabul from the US base at Bagram.
At the end of last year, the commander of the US-led military coalition in Afghanistan, Lt Gen David Barno, told the BBC many suspected militants held at US bases could be released shortly.
The detainees, all Afghan men, were transported in two buses from Bagram to the Supreme Court in Kabul, from where officials took them to the bus terminal to complete their journey home.
The US is holding more than 500 suspected Taleban insurgents at its two main bases in Afghanistan, Bagram and Kandahar.
Human Rights Watch has accused US personnel there of using excessive force, carrying out arbitrary detentions and mistreating people in custody.
Last month, the group accused the Pentagon of continuing to fail to investigate abuses or punish the guilty.
Human Rights Watch also urged the US military to publish a delayed internal report on its Afghan detention centres.
The Pentagon has admitted that eight detainees have died in US custody in Afghanistan since 2002 and says individuals are facing charges in three cases, while three more are still under investigation.