The move comes after an increase in local COVID-19 cases and as tens of thousands of Afghans return from neighbouring Iran, one of the countries hit hardest by the pandemic.
President Ashraf Ghani’s decree was directed at women, young offenders, critically ill patients and inmates aged over 55, said Attorney General Farid Hamidi.
“This is a responsible decision to safeguard the health of the people,” Hamidi told a news conference.
“The decree is not for those who have committed crimes against national and international security.”
Prisons chief Ahmad Rashed Totakhail said between 9,000 and 10,000 inmates would be released over the coming 10 days.
UN rights chief Michelle Bachelet has urged countries to protect people held in overcrowded prisons and other enclosed facilities by releasing vulnerable detainees, saying COVID-19 “risks rampaging through such institutions”.
Sudan and Ethiopia have recently ordered the release of thousands of prisoners in an effort to slow their own outbreaks.
Afghanistan has officially recorded two deaths and 80 cases of coronavirus, but the true figure is feared to be many times higher as the war-torn country struggles to administer tests and screen the influx of people returning from Iran.
The upcoming prisoner release is unrelated to a prisoner
exchange the Kabul government is currently negotiating with the Taliban as part of an effort to start peace talks.