The commander of police checkpoint number three on the main road to Helmand took a deep draw on his joint of strong hashish and pointed an AK-47 unsteadily towards the desert from where the Taliban attack.

Commander Gul Mohammad, a ragged figure with bloodshot eyes, plastic sandals and a jaunty turban, is Nato's first line of defence on a dangerous section of Highway One from Kandahar at a point where guerrillas attack every few nights.

Stuck in a tiny sandbagged position overlooking the road in the middle of a wilderness, with no night vision equipment to help him see attackers and no working radio to call for help when they come, the commander needed the joint to take the edge off his fear as night fell.

The top of the metal shipping container where his 10 ill-trained policemen sleep was still riddled with bullets from two nights before. The Taliban had fired a rocket that whooshed over the commander's sandbagged firing point, which was strewn with spent bullet cases, cigarette butts and potato peelings.

Out of earshot of the police officers whose morale he had come to boost, a Gurkha NCO helping to ring the tiny fort with razor wire confessed that he would not wish to spend a night there. "There are too few of them if the Taliban launch a big attack," he said, with a shudder at the thought.

Fortified with hashish, the police commander was more sanguine. "If the Taliban catch us, they will first cut off our nose and ears," he said. Gesturing towards a couple of derelict houses by the side of the road half a mile away to the east, he added: "We often see them stopping cars there but there is nothing we can do. Our weapons don't have enough range."

Beyond that point were some burned-out buildings - they were the former position of checkpoint three and its previous ill-fated garrison. A few weeks ago they fell for a Taliban trick. Men in police uniform drove up and told them that the police chief was angry with them; they were to come into town for a dressing-down. The 16 men and boys, none of them older than 24, didn't question the "policemen" - partly because a pale-skinned, English-speaking man was with them, who they assumed was a foreign special forces soldier.

Once disarmed, they climbed into the imposters' vehicles and were driven to a Taliban court where they were convicted of being traitors and beaten to death. Their pleas for mercy and their "execution" were filmed, and their body parts afterwards strewn across the district as a grisly warning.

In the aftermath, morale fell to pieces among Maiwand's rag-tag police, the only security force in a key district where no foreign soldiers or Afghan National Army troops are based. More than 100 have been killed in the past year, mainly by bombs and in ambushes, and many complained that they go for weeks without being paid - their monthly wage is 3500 Afghani (about £35).

The hapless force became little better than brigands in uniform, stopping drivers on Highway One to steal from them and robbing traders in Maiwand's shabby bazaar at gunpoint, as the Taliban took over outlying villages, set up checkpoints and fired rockets into the town.

Three weeks ago, with security across the district threatening to unravel, the police were pulled out for "retraining" and a new force sent in, including Gul Mohammad.

British soldiers from First Battalion, The Royal Gurkha Rifles, mounted an operation to support the new police force, sweeping suspect compounds and mounting patrols.

Dr Mohammed Amin was delighted to see them patrolling past his clinic. He said: "The old police were trouble, they were harassing the people and stealing from them. The new police have been better, so far."

But he was less pleased when he learned that the British were only there for a week. "The Taliban run the villages, the police run the town, just," he said. "It is dangerous here. They fire rockets in the bazaar. I would go to live in Kabul if I could afford to."

Three days into the operation, an Afghan National Army detachment suffered a disastrous accident: one of them accidentally fired a rocket inside a concrete room, grievously injuring eight of his colleagues. One bled to death and four others had to have legs amputated. Hardened Afghan soldiers watched in tears as their comrades lay screaming on the ground while Gurkha medics worked to save them. The unit, which had proudly driven into Maiwand the day before, determined to fight the Taliban, left quietly by road a couple of hours later to bury their dead comrade.

A day earlier, two policemen had been killed by a Taliban roadside bomb. Hatred of the Taliban runs strong among the police rank and file, even though there are suspicions that district leaders and police officers may have links to rebels or to drugs gangs.

British soldiers were frank about the problems faced by the Afghan National Police, who they rely on for security in areas such as Maiwand. The officers receive little support and training compared with the Afghan National Army and are easy prey for the Taliban, who are wary of attacking heavily-armed foreign troops.

In districts such as Maiwand, there is support among local people for attacks on the hated police who prey on them.

Sadiqullah, 19, who had stayed at Maiwand's police station after most of his colleagues were removed from their posts, was friends with the men who were kidnapped and murdered.

"They knew it was dangerous, they had been attacked hundreds of times," he said. "They had to feed their families and they wanted to do something to help their country."