A Canadian journalist says he was beaten up and nearly shot while being held captive in Afghanistan.
Ken Hechtman was released on Saturday after being detained by the Taliban for travelling without travel documents.
He says his captors thought he was a US spy, working on the ground directing US air strikes.
In an article for the alternative Canadian news website Straight Goods, he says he probably looked like a spy and had a phone like the CIA-issue satellite ones.
He said: "The Taliban has caught between 20 and 25 spotters and they all look just like me."
Mr Hechtman says before he stood trial for being a spy a judge told him to pick a name out of his hat. When he asked why, the judge told him: "He gets to shoot you, just as soon as we finish this formality of a trial."
As part of his trial he was taken into a prison yard where soldiers pretended to shoot him if he didn't answer questions in Urdu. They claimed he would speak the language if he was a spy from Pakistan.
After convincing the soldiers and judge he was not from Pakistan, he was taken to a jail while the Taliban decided whether or not to release him.
Despite media reports about his treatment in jail, he says he was never chained up or kept in solitary confinement, but he did suffer some initial beatings.