The Taliban have claimed responsibility for killing five British troops in Afghanistan guardian.co.uk

The British soldiers unstrapped their equipment as they passed through the mud walls of the police compound, having only recently returned from patrolling the Helmand countryside with the men they were mentoring in the Afghan police.

Inside the walls of the checkpoint, rifles were unslung and body armour put aside as the men drank tea, completed paperwork and relaxed after their mission.

But, unknown to the men, one of the Afghan police – a man named Gulbadin – had clambered on to the flat roof of the building above, armed with a powerful PK machine gun. When he started shooting, the soldiers barely had a chance.

Sighting his weapon, Gulbadin fired down on the weaponless troops, a mixture of Grenadier Guards, Royal Military policemen and Afghan police. Some tried to grab for their loaded rifles, but only at the end, with four British soldiers dead, one fatally wounded and eight others injured, including two Afghan police, were those inside the police station able to return fire at the shooter before he managed to escape – aided, it is suspected, by another policeman.

What happened on Tuesday afternoon was a few brief moments of carnage. They were moments, however, that have been written into the increasingly bloody recent history of Britain's engagement in Afghanistan as one of the worst single losses of life in a shooting incident. Among the fallen was Sergeant Matthew Telford of the Grenadier Guards, the first of the dead soldiers to be named.

The police station at Shin Kalay is not much to look at. A few hundred metres from the rest of the village, it is a low, blocky structure, set behind a wall, guarding a solitary road and a bridge over an irrigation ditch that cuts through Helmand's tapestry of square green fields.

But in a war whose frontlines are ill-defined, the Shin Kalay checkpoint, say those familiar with the area, is located on one of the conflict's invisible boundaries, about 100 metres from where Taliban territory begins. What is significant is that the bullets did not come across the fields from a distant ditch or building but from inside, from the barrel of an ally's gun. It comes in a year marked by several such instances, raising serious questions about the loyalty of Afghanistan's security forces.

With a manhunt under way, it was left to the British army to explain how the attack had been so lethally effective.

Lieutenant Colonel David Wakefield, the spokesman for Task Force Helmand, said it was almost certain that the soldiers were not ready to defend themselves. "The first thing you do when you come back from a patrol is to put down your weapon and helmet, so although we don't know yet and it's subject to an investigation, it's fair to assume they were not ready for the attack."

As British military and Afghan investigators began piecing together the circumstances of the attack, even as the injured and dead were loaded on to US Chinook and Blackhawk helicopters for evacuation to Camp Bastion, it became clear it would make uncomfortable reading for those involved in training both Afghanistan's army and police.

There were conflicting reports. Some said the Taliban had been quick to claim responsibility for the attack, explaining the group wanted to sow mistrust between foreign forces and the Afghan police. Other information emerging about Gulbadin suggests that the motives behind his attack are likely to be complex.

The reality, it appears, is that Gulbadin was no new recruit, a Taliban infiltrator sent to penetrate the troubled police service for this attack alone. Instead, it was disclosed today, the gunman joined up three years ago, undergoing his initial police training in the city of Kandahar.

He was a member, however, of the Alozai tribe in an area where the Noorzai tribe dominates the police. And while tribal elders said after the killing they were aware he had Taliban links despite being in the police, Gulbadin appears to have been conflicted in other ways too.

According to elders, he had recently been involved in a furious dispute with a police officer named Muhammad Wali, his commander for the previous two years. Unable to work with Wali, Gulbadin had been reassigned to a new unit, the police checkpoint in Shin Kalay, commanded by an officer named Manam.

The tribal elder said Gulbadin's new commander tried to help patch up the relationship between the two men and to persuade him to go back to work for Wali. The elder said Manam had also been injured in the shooting. Indeed some reports said he may have been the first target.

What little is known about Gulbadin, who some sources say may have been injured in the exchange of fire, is deeply suggestive. It indicates – experts and military sources believe – the complex and shifting loyalties among police, Afghan soldiers and local politicians in Afghanistan's Taliban insurgency.

"The questions we need to ask are much more complex than are apparent at first view," said one Nato officer in the Afghan mission. "What is a Taliban? What is the threat? From our end the concern is the same as the argument laid out by David Kilcullen [the influential Australian counter-insurgency expert]. It is about loyalty. Even if individuals think ISAF [the International Security Assistance Force] is doing a good job, they are still not your own people. Nowhere is that more true than in Helmand where we are confronted by overlapping webs of association and loyalty.

"The army has been successful because it has been nationally recruited, but the police are recruited locally. They are still part of a local network of loyalty ... [They are people] whose families are vulnerable. Who have to think about where they live."

And while British officers in Helmand were quick to characterise the shootings as a "rogue" event, the incident at Shin Kalay has not been unique.

Last year, two American soldiers were shot and killed by Afghan police in the space of about a month. In October 2008, a policeman threw a grenade and opened fire on a US foot patrol, killing one soldier, while in September, an officer opened fire at a police station in Paktia, killing a soldier and wounding three before he was shot dead. In July in the Helmand town of Aynak, police opened fire on a group of around 150 US marines and Afghan soldiers as they approached the police headquarters.

Indeed, serious concerns have repeatedly been raised about the police in Helmand since British forces went there in spring 2006. Its police have a particularly bad reputation and are often accused of taking drugs, extorting bribes and turning a blind eye to opium smuggling.

Captain Doug Beattie, a former British soldier who trained Afghan police from 2006 to 2008, today questioned their loyalty. "They're really a militia, a tribal police whose allegiances are not necessarily to the government or even to the provincial governor. [Their loyalty] is normally to their village or tribe or the area they come from," he said. "Because they're militia they can be bought and paid off at will. If the government's paying them they're reasonably happy. But if they don't get enough money they're quite happy to be paid by the insurgency."

It is an issue that was addressed by Major General Nick Carter after the killings. "The first point I would make is that we have to trust the uniform of the Afghan police. The second point I would make is that we will get better at this. We will make it perfectly possible for us absolutely to understand who we are working with because we will train them, and we will make sure that they are capable of doing the job in the way that they need to do the job."