A former Taliban commander who plotted scores of attacks against troops in Afghanistan is to become a prison officer after abandoning his old way of life.

Abdul Ghani is currently serving a 20-year sentence in Lashkar Gah prison.

He was jailed after being handed in to the authorities by his Taliban leaders when he refused to carry out a suicide bomb attack.

The defector was described as a “middle manager” with the insurgency in the country’s Helmand province.

The 37-year-old openly admits to being responsible for co-ordinating gun and bomb attacks on coalition troops, but that came to an end when he refused orders to sacrifice his own life.

Now, after more than two years behind bars, he has won the trust of prison authorities and is regularly allowed to leave prison unescorted.

After turning his back on fighting, he hopes to become a prison guard when he is released – joining the ranks he once despised.

Ghani said: “I don’t feel that I’m in prison. I feel like I’m at home.”

He is currently being held in the British-designed high-security prison at Lashkar Gah.

He told how he is allowed out of prison to travel around the provincial capital city and is visited behind bars by his seven-year-old son.

Ghani has even been given use of a motor-tricycle to travel to and from the jail, running errands and collecting supplies.

Speaking about his transformation, Ghani said that when he arrived at the jail he had wanted “to kill all of the staff”.

He has been awarded the special privileges for turning his back on the fighting.

The authorities hope the rewards will act as an incentive to other fighters to turn themselves in.

Phil Robinson, prisons advisor at the Helmand Provincial Reconstruction Team, said the change in Ghani’s mindset had been remarkable.

The former head of operations at HMP Wandsworth said: “When he arrived, he was aggressive.

“His attitude was: ‘I want to kill the staff’ and in a matter of months they’ve changed his mindset.”

Nearly half of the prison’s 1,000 inmates are convicted insurgents and they are kept in separate cells from the main population.

Many are undergoing training in subjects such as mechanics, tailoring and computing in order to find alternative employment on their release.

Mark Leech editor of Converse the national prisoners newspaper welcome the move.

“Over here ex-offenders, who probably know more about how to reduce crime than any half-baked politician, are not seen as a potential resource – neither are former prison staff come to that.

“The ill-named ‘independent’ prison inspectorate and the hapless Prisons Ombudsman have never found room for successful ex-offenders or former prison officers, which is why both organizations are in such a mess – at least in this case they recognize people can change their way of life and that former prison staff with decades of experience have much to offer.”