Taliban fighters changing sides in Herat
Much of the recent history of Afghanistan can be told through the life of one commander in the western city of Herat - Abdullah, known as "Charsi", which means "the hashish smoker".
In a city proud of having Afghanistan's only museum to the jihad, the Islamist war against Soviet domination in the 1980s, Abdullah "Charsi" was one of the mujahideen fighters, led in the west by the legendary commander Ismail Khan.
He lay low in the Taliban years in the late 1990s, but amid growing disorder when US-led troops came into the area, he joined the Taliban. Now he has brought his followers back from the mountains to rejoin the government side.
Abdullah's alliance with the Taliban was not ideological but practical. They offered security at a time of insecurity.
Now, amid a general redrawing of forces ahead of the departure of foreign combat troops in less than two years' time, he is switching to what he believes will be the stronger side. He says that as the foreigners leave, "we Afghans have to take the country for ourselves."
He knows of three other groups of ex-mujahideen fighters, numbering hundreds of men each, moving back from the Taliban to the government side.
Since he left the Taliban, Abdullah claims his men have been at the forefront of several operations by Afghan government forces against the Taliban - unofficial militias fighting alongside uniformed government troops.
Now he wants to join the government formally and rolled out a long sheet of paper marked with hundreds of thumbprints and signatures of local elders who back his bid to be the police chief for a large part of the city of Herat and the border with Iran.
"I haven't done anything against the law. I went to the mountains with the Taliban because of security problems," he said.
"I did not plant mines in villages, or use suicide bombers as they did.'
But not everybody backs him. Abdul Karim is a Red Cross official who claims he was tortured by Abdullah's men when they were with the Taliban.
He said that twice they threatened him and extorted large quantities of fuel, and when he did not break his links with the government, more than 30 men appeared on motorcycles and took him away.
"They took me to the edge of the river, tied my hands and feet, blindfolded me and beat me.
"They hit me so hard that I began to bleed." He says that they threw him into the river, and left him for dead.
He said that Abdullah should not be made a police chief, but "should have been hanged in public, as a lesson to others".
Abdullah denied the allegations of torture. But he said that Adbul Karim should have been killed for what he did - claiming he was a government spy (working for the very government that Abdullah is now trying to join).
The process of "reintegration" - persuading those allied to the Taliban to hand in their weapons and come over to the government side - is led by a British general, David Hook.
He said that to encourage the switch, fighters are given a general amnesty, but not for serious crimes: "If you have committed crimes against humanity, or crimes like torture, then you will be held accountable by the legal system of Afghanistan."
If the torture victim we spoke to is to be believed, then those running reintegration programmes are not looking very closely at the pasts of those they disarm.
And what appears to be happening in the Herat region is men coming over to the government side, not because of government incentives, but because of a change in atmosphere, as alliances alter ahead of the departure of foreign forces.
Those who take up the government offer to leave the Taliban receive a coat, a Koran, and three months' wages.
But the scheme is having little impact in the places where the Taliban are strongest. Most of the 5,000 who have reintegrated in the last two years are from the north and west - with the largest number coming over in Ghor Province, never a Taliban stronghold.
'Me or the Taliban'
At a reintegration ceremony in Ghor witnessed by the BBC, many taking up the offer were old men, handing in rusting, locally-made single-shot rifles, and did not look like Taliban at all. Some western diplomats have privately expressed doubts about the value of the scheme.
One tribal leader near Herat has left the Taliban for an unusual reason. The girl he wanted to marry gave him a simple message: "Choose me or the Taliban." Basir Ahmed is not a typical Taliban fighter, being easily persuaded to pick up his harmonium, and sing a love song.
He had joined the Taliban - like so many others in this region - to defend himself against criminality and disorder. He handed in his rifles to the headmaster at the school where his intended wife, Parveen, was studying.
Now both regret it. He has left himself defenceless, and his house has been attacked three times.
Ending conflict and dealing with wrongs committed during it are never tidy affairs.
The challenge to the Afghan government, both in the case of the alleged torture victim Abdul Karim, and the singing ex-Talib, Basir Ahmed, is to provide security to protect them.