Burundi is set to release thousands of inmates to ease overcrowding in the east African nation’s prisons.

Some 5,255 prisoners or roughly 40 percent of the prison population will be set free, according to a decree seen by the Agency France-Press.

President Evariste Ndayishimiye reportedly said the clemency was a necessary step to reduce overcrowding and improve conditions.

The AFP says inmates serving up to five years qualify for the presidential pardon, with the exception of those considered a risk to national security.

Inmates serving time for corruption will be freed on the condition they pay back misused funds, including damages and court costs.

The pending release of the inmates comes a little more than two months after President Ndayishimiye signed a decree freeing four journalists in a highly publicized move after making promises to ease restrictive tactics by his predecessor’s administration.