A South African security contractor caught in possession of what he claims he thought was protein powder but was almost 6kg of heroin has told of his gruelling imprisonment in one of Afghanistan's toughest prisons.

Bevan Campbell, a Johannes-burg father of two, made unlikely friends inside prison: the Taliban.

"Prior to meeting these guys I thought they were a bunch of idiots but some were well educated and articulate, and could speak English,'' Campbell said after his recent release.

"I'm a former soldier, they're fighters; we had a bond, a mutual respect."

One in particular became a close friend.

"He said: 'Are you scared of us?' and I said: 'I'd rather keep you at arm's length.'

"He said to me 'You don't have to worry about anything in here but if you walk through the gates, if you're not a Muslim, you're an enemy and we'll kill you outside.'

"It was a very strange relationship that developed because you knew that it was just for the here and now," he said.

The former major in the S A Air Force served most of his six-years-and-three months sentence at Pul-e-Charkhi Prison, on the outskirts of Kabul.

There is a lot of male-on-male sex inside Pul-e-Charkhi, accord-ing to Campbell.

"If you're the taker, it's seen as gay. If you're the giver, it's seen as totally fine."

He was moved around the prison a few times. At worst, he shared an eight-bed cell with 44 others. At best, he had a cell to himself.

Campbell's chess partner was Talib Jan. He describes him as being in his late 20s or early 30s, very thin with reddish brown hair. "He always had a smile on his face."

Jan was believed to be responsible for the 2011 bombing of the Finest Supermarket, in Kabul, next to the British embassy.

The attack killed 14 people: nine Afghans and five foreigners.

Campbell spent time talking to the Taliban prisoners about the war in Afghanistan.

"One commander said to me: 'We have the time. The Americans are not prepared to stick this out as long as we are'."

It's a phrase frequently heard in Kabul. The Americans have the watches but the Taliban have the time.

Campbell struggled mentally during his imprisonment when he was struck by the pain of a decaying wisdom tooth. It was months before the police took him to a Kabul dentist.

"I had handcuffs on. On the dentist's chair my hands were shackled to my feet. I had two police officers and four security guards watching me."

Not counting the Pakistanis and Iranians, Campbell said there were six foreigners serving time in Pul-e-Charkhi: three Ugandans, two Nigerians and an Australian.

On the day of his release, November 12, it was the 18th time he had been told to pack his bag. But this time, his American lawyer, Kimberly Motley, had secured a pardon from Afghan President Hamid Karzai.

His focus now is on catching up with his family and caring for his father, who is dying of cancer. His mother died while he was in jail.

"I've not ruled out [going] back to Afghanistan. I've met a lot of interesting people. Some I want to see again."