Warning: This article contains descriptions some readers may find upsetting.

Pul-e-Charkhi prison, on the outskirts of Afghanistan's capital Kabul, is surrounded by colossal grey stone walls topped with barbed wire, and guarded by numerous watch towers and huge steel gates. Of the 10,000 inmates, about one fifth are Taliban - Afghanistan's hardline Islamist insurgent group.

Taliban inmate Mawlawi Fazel Bari says he wasn't born a fighter, but after five years in prison, he says he’s never felt more ready to die.

“I have become so frustrated. I never thought I would carry out a suicide motor-bomb, but now, by god I swear I will.”

For the time being, Bari will remain incarcerated at the top-security jail. But the prison is one of a number across the country that has been releasing Taliban prisoners in unprecedented numbers, as part of a goodwill gesture by a government locked out of peace talks.

The Taliban’s long-term aim is to restore the Islamic Emirate in Afghanistan - its system of governance while it was in power between 1996 and 2001 - which introduced Sharia, or Islamic law, and a harsh regime, banning women from public life and introducing punishments including stonings and amputations. It is not clear how any future Taliban regime would operate.

Hundreds of thousands of people have died in Afghanistan since US-led forces toppled the Taliban government in 2001, including tens of thousands of civilians.

The Taliban prisoners were open during our visit about their motivations and grievances, but reluctant to talk about their specific activities. But we do know that Mawlawi Fazel Bari joined the Taliban 15 years ago and became a commander for the group in Helmand province, fighting Afghan and international forces in that region.

Bari’s tiny prison cell is packed with Taliban members. There are queues out into the corridor - some men hunkering down in the doorways, others looking down from three-tier-high bunk beds. One elderly inmate sits on the floor, silently chanting over long prayer beads.

The floor is a sea of red carpet and cushions, and across all four walls there is a mosaic of posters depicting images of the Islamic holy sites of Mecca and Medina, as well as generic idyllic scenes - bouquets of flowers, waterfalls, even ice cream cones.

The cell has been decorated to invoke a vision of paradise, reflecting the inmates’ fundamental belief that if they are killed in action they will go straight to heaven.

Next to the walls are improvised shelves piled high with heavy books on Islamic literature and the Koran.

Bari begins to preach and all eyes turn to him. He is also a former senior scholar, and as such his fellow inmates hold him in high regard.

“I tell you this,” he says, “as long as there is one foreign soldier in Afghanistan, peace is not possible.”

The Taliban in Afghanistan were accused of providing a sanctuary to Osama Bin Laden and the al-Qaeda movement - blamed for the co-ordinated terror attacks on the US in September 2001. After 19 years of war between the Taliban and the US-led forces, the conflict in Afghanistan is now the longest in US history.

President Donald Trump seemed close to a deal with the Taliban in September. But he abruptly called off peace talks after the militants admitted responsibility for a bomb blast in Kabul that killed 12, including a US soldier.

The US says it still has at least 13,000 troops in the country. As part of a draft deal with the Taliban - currently off the table following the break down of talks - it promised to reduce them to 8,600 within the first five months of it being signed.

Mr Trump pledged during his 2016 presidential campaign that he would end the US war in Afghanistan. But many critics believe without involving the Afghan government - so far not included in the peace talks - such a withdrawal could leave the country in chaos.