“They do not know anything else except religion and their traditional codes,” he said. “They see attitudes of foreign forces alongside themselves which are not compatible to what they understand. That causes spite and resentment among them.”

Some Afghan commanders say attacks are simply a product of a violent society. “No one is safe now; everyone gets killed,” said Gen. Mohammad Zaman Mamozai, a senior police official in the Interior Ministry.

That could help explain an equally disturbing rise in Afghan forces attacking their Afghan comrades. NATO officials do not have precise year-to-year figures, but there have been at least four such episodes in the past month.

An American diplomat emphasized that the rise in Afghan-on-Afghan attacks underscores how the problem is more complex than infiltration or even anger at Western forces. The diplomat noted that some Afghan leaders like the Helmand provincial governor, Gulab Mangal — who called an emergency meeting after the Helmand episodes and vowed to do everything he could to help Marines — were every bit as concerned as American officials.

No one expects the problem to go away, and some fear it may only get worse as American and NATO troops team up with Afghan forces in almost 9 out of every 10 combat operations. That means more chances for disaffected Afghans, or the occasional infiltrator, to kill an American.

“There are simply more opportunities now because we are partnering so heavily,” Colonel Collins said. According to NATO data, there were 39 coalition deaths from the attacks in the first eight months of this year, more than all of last year and more than the entire period from 2007 to 2010.

Tactical changes have already affected everyday routines of coalition troops. While the order to keep magazines loaded in weapons was already standard practice in a few places, the countrywide edict has dramatically underscored how seriously the threats from Afghan forces are now viewed.