Afghanistan's President Ashraf Ghani has approved the release of 1,500 Taliban prisoners as part of efforts to secure a peace deal with the Taliban.
The presidential decree requires all prisoners to give "a written guarantee to not return to the battlefield".
In exchange, the Taliban has agreed to hand over 1,000 government troops.
It comes as the US begins withdrawing troops from the country as part of anagreement signed earlier with the Taliban.
According to the decree signed by President Ghani, all 1,500 prisoners will be released within 15 days, "with 100 prisoners walking out of Afghan jails every day".
Talks between the Afghan government and Taliban will take place in parallel with the release. If talks progress, the government has pledged to free 500 more Taliban prisoners every two weeks until a total of 5,000 have been released.