Musa Qala, in northern Helmand, will shortly become the first British base in Afghanistan to be handed on to US Marines.
BBC defence correspondent Caroline Wyatt visited the town to see whether there are any lessons to be learned.
Back in 2006, it seemed unlikely that the Taliban's then stronghold of Musa Qala, a centre of the opium trade, would be persuaded to listen to the voice of the Nato coalition and the Afghan government.
But the defection of a local Taliban commander, Mullah Salaam, helped turn the tide after a controversial deal between British troops and tribal elders to keep the insurgents out had collapsed.
The town was recaptured in fierce fighting between the Taliban and the Nato coalition and Afghan forces in Operation Snakebite in December 2007, with Mullah Salaam ready and waiting to be district governor.
He may not be the most effective administrator, but he remains a rare symbol of Taliban re-integration.
It's been hard, there's no doubt about it, but we've convinced the local population that this is the way to go
Lieutenant Colonel Harry Fullerton
At the shura or gathering in a small bare room with the the local police chief, Commander Koka, and the local Afghan Army head, Colonel Rasoul Kandahari, they talk out - rather than shoot out - their disputes.
That in itself is progress. At the same shura, the British military commander here, Lieutenant Colonel Harry Fullerton, and the rest of his team - including police mentors, an intelligence officer and a political officer - play the tricky roles of referee and mentor simultaneously.
At their latest meeting, Mullah Salaam is complaining that the Household Cavalry Regiment Battlegroup, which has been here for nearly six months, simply isn't violent enough.
He says that the Russians would have been much tougher with the remaining insurgents to the north and south of the town, and gone in all guns blazing.
But Captain Roly Spiller, the headquarters' British intelligence officer now on his second tour of Afghanistan, is unfazed by the governor's complaints.
"He spent his youth fighting the Russians, and he's used to the Russian way of flattening villages that got in their way, whereas we have taken the approach of waiting until a village is ready to fall, without forcing fighting in the streets," he says.
"It may mean slower progress but it does mean that when we have taken villages, it's been a lot easier to manage them after that."
The build-up of the Afghan police and Afghan National Army here, under local leaders who are competent and - crucially - not corrupt, has also helped create something approaching peace, at least in the town centre.
As we walk through the bazaar, protected by a British patrol and still wearing flak jackets and protective helmets, it does appear to be thriving by the standards of rural Helmand.
The shops stock everything from DVDs of Bollywood favourites to shiny new motorbikes.
The shelves are no longer filled with opium, as they were three years ago - although it is still traded more discreetly elsewhere. The Afghan police headquarters is now based in what used to be the main opium bazaar.
Afghan soldiers helped to take Musa Qala from the Taliban in 2007
And it is Afghan police who are in the lead in this joint patrol with British soldiers from a TA Regiment, 3 Royal Anglians.
One policeman tells me that the Taliban do sometimes return to the town at night, to ask for food or shelter from people, who then complain to the police.
Sometimes they send threatening "night letters" to intimidate people seen working with or for the coalition. But the insurgents do not come into town with guns any more, and the local police regularly patrol the streets.
But Angus Stewart, a diplomat who is spending two years as Musa Qala's political officer, isn't sure whether what has happened here can be replicated elsewhere in this troubled province.
That is partly because of its geography - which helps protect the town - and its tribal make-up.
'Way to go'
"There are many factors that have come together in Musa Qala," he says. "Just one of those is a tribal structure prepared to engage with central government, and I'm not sure that's the case across Helmand."
"We also have very effective local Afghan security forces."
That does not mean that the guns have fallen silent. Only this week, British troops launched a fresh offensive against insurgents several miles to the north of the district centre in Karimanda - aiming a deafening 105mm light gun at their position.
British convoys and outlying patrol bases remain a target for roadside bombs, and in all, some 21 British lives have been lost in Musa Qala over the past three years.
But Lt Col Fullerton is confident that the relative calm will persist.
"It's been hard, there's no doubt about it, but we've convinced the local population that this is the way to go."
Yet neither he nor the other soldiers I speak to have any qualms about handing on Musa Qala to the US Marines.
There is instead a quiet sense of achievement, that they are leaving a town that the Americans will hardly recognise as the one they helped British soldiers to re-take from the Taliban in 2007; a town in which years of effort and a nuanced approach to counter-insurgency may gradually be bearing some fruit.
Troops in Musa Qala may be preparing to hand over control to the Americans