Across Afghanistan, foreign soldiers are carrying loaded weapons to gyms, mess halls and offices to protect themselves from people they thought were their allies. A series of attacks by Afghan policemen and soldiers on their Nato mentors and comrades-in-arms have undermined military morale and the basis of the international mission in Afghanistan.
In the latest incident, on Sunday, two policemen in the Kandahar border town of Spin Boldak turned their guns on US soldiers, killing one. This year about 10% of the foreign soldiers killed in Afghanistan have died at the hands of Afghan government forces, and there have been more such attacks and deaths than in all of 2011.
"We're in Afghanistan allegedly to help the Afghan people, and then our soldiers are being killed by Afghan soldiers that we're there to help. That just doesn't make sense to people," said Andrew Exum, a senior fellow with the Centre for a New American Security, who led a platoon of US army rangers in Afghanistan in 2004. "For that reason, I think that even though these attacks may be somewhat insignificant tactically, they have a huge strategic effect on the coalition."
The political impact was on display when the French president, François Holland, announced in May that he was bringing the country's troops home early, a move driven in part by an assault by an Afghan policemen in January.
"The French have made their decision and it was partly based on the awful green-on-blue attack they suffered," said one senior diplomat in Kabul, using a military term for such attacks. He warned that the shootings had the potential to dent Washington's commitment to Afghanistan. "It certainly is a political problem in the US. It might affect the speed of the US drawdown in 2013 and 2014, because if the public reacts strongly in a negative way to this, that is a political factor that they will have to take into account."
The Taliban have claimed almost all of the attacks, and the Afghan army and police are trying to weed out infiltrators with undercover intelligence agencies and background checks on new recruits. The military coalition in Afghanistan has long argued that most shooters are not groomed insurgents but driven by pent-up anger and personal issues in bases where weapons and ammunition are almost always to hand. "There are some attacks that we will never understand. Of those we do, the vast majority are attributed to personal grudges," said Jamie Graybeal, a spokesman for the Nato-led mission.
A military report on the problem from April last year, titled A Crisis of Trust and Cultural Incompatibility (pdf), cited anger over everything from civilian casualties to apparently minor issues such as US soldiers urinating in public. American troops in turn looked down on Afghan counterparts for reasons ranging from perceived bad hygiene and laziness to drug use and corruption.
But analysts and diplomats say there is little comfort to be taken from the failure to find a Taliban hand in most attacks. Random outbursts driven by resentment and anger are a far greater concern because they are so much harder to tackle. "If it's infiltration, it is a strategic, tactical decision which you can take measures to counter," said the senior diplomat. "They are bringing in better intelligence, better vetting, undercover agents. But you can only marginally reduce the toll this way if it's not infiltration, because if you have those impulses going on now, you will have them in the future."
The attacks threaten to undermine the west's long-term plans to keep Afghanistan out of Taliban hands. As foreign troops head home, those left behind are switching their efforts from fighting insurgents to training up Afghan security forces to go into battle instead.
Exum said: "The strategy going forward relies on the assumption that US and allied forces are going to be able to have a close working relationship with their Afghan counterparts. And I think now we are having to re-evaluate the way in which a decade plus of war has strained not just the Nato alliance but has severely tested the goodwill of the Afghan people and our working relationship with the Afghan security forces."
Nato officials have stepped up security with a "guardian angel" system of soldiers whose only job is to watch their fellow troops. Others must keep their weapons loaded at all times. The system may have reduced the number of deaths – some shootings since the guardian angels were introduced have ended only in injuries – but it will do nothing to resolve the underlying problem.
"Its systemic and it will continue until we leave," said the Kabul diplomat. "But I think it will be very difficult for the population to understand and the politicians to explain."