As a bomb aimed at a US military convoy ripped through a crowd in Kabul, Afghanistan, late last month, the American soldiers survived but civilians were wounded.

Afghans gathered en masse to help their fellow countrymen, but they turned their ire toward the US troops, one of whom fired into an empty, bombed-out car to disperse the crowd.

Rumors quickly spread, however, that the Americans had fired upon unarmed civilians. In the midst of chants of “death to Americans” and being pelted with rocks, one US soldier was stabbed.

In the aftermath of the outpouring of anger toward the Americans, a Pentagon report released last week concluded that the soldiers acted with “admirable restraint.”

But the episode illustrates, too, a particular challenge for the US military: being, in the minds of many Afghans, a permanent occupying force. Even as the United States begins to dial back its presence in Afghanistan, there have been tens of thousands of US troops in the country for a dozen years now – America’s longest war.

Given that the US military will probably remain in Afghanistan for some time to come, it will continue to grapple with whether it is in fact possible to become a permanent occupying force without being seen as an occupier.

Gen. Joseph Dunford, in his confirmation hearing Thursday to become the next chairman of the Joint Chiefs of Staff, told lawmakers that he believes withdrawal of US troops from the country should be “based on the conditions on the ground” rather than a “calendar-based” decision.

“My experience has been that sometimes the assumptions that you make, you don’t obtain, particularly with regard to time. And that’s certainly the case in Afghanistan,” said General Dunford, who previously served as commander of US forces there.

It is the sort of graduated withdrawal that could take years. The challenges of being an occupying force are different from those of strategic war-fighting, and the episode with the angry crowd last month shows that US troops have been learning some important lessons during their decade-plus of warfare there.

Years of counterinsurgency warfare have reinforced the notion that “it’s a constant effort to build that rapport with the people,” says retired Col. John Agoglia, former director of the Counterinsurgency Training Center in Kabul.

“You’ve got a generation of folks that are not as literate, that have been brought up on learning what they have through word of mouth,” he says. “It doesn’t take much to believe the conspiracy theories – or [create a flash mob].”

Last month, after seeing a comrade stabbed in the arm by an extremely agitated civilian, a nearby US soldier simply pushed the man with the knife away, according to an account in The New York Times. “I was really amazed to see how patiently the American soldier acted,” an Afghan witness told investigators.

The Pentagon investigation also found that US soldiers fired just two warning shots during the episode. Afghan forces, on the other hand, may have actually fired into the crowd: That part of the investigation is ongoing.

It helps that after a number of notable incidents that involved, among other ill-advised actions, urinating on enemy corpses, US troops have become increasingly accustomed to the idea that in an era of camera phones and YouTube, their actions often do not go unrecorded – and that accountability matters. Pentagon officials probably conducted their investigation using video from one of the dirigibles equipped with cameras that they use to monitor the goings-on around their bases.

What doesn’t help, however, is that Taliban forces tend to push the notion, through their own propaganda campaigns, that US troops are incorrigible aggressors.

One way to counter this is with political partners, in the Afghan government, for example, “Who are willing to say, ‘No, we have US forces here for these reasons’ and educating the population as to why they’re there,” Mr. Agoglia says.

This didn’t always happen in the past, particularly during the years that former Afghan president Hamid Karzai repeatedly criticized the US military in an effort, Agoglia says, to score political points.

Mixing with the population can help as well, and perhaps there is room to do more of this, Agoglia argues.

“It allows the people to see US troops as human, when you have soldiers out among them.”

This is something that US military commanders have generally avoided. Most soldiers are not allowed off-base to, say, grab a bite to eat downtown. This is for security, and also for the express reason that the US doesn’t want to remind Afghans that they are there – because they don’t want to be viewed as occupiers.

There’s also the chance that US troops could do something dumb while they’re out and about.

Agoglia acknowledges that mixing with the population can be a double-edged sword. “Groups of soldiers can be stupid, and do stupid things, but you have to trust in your troops’ discipline,” he says.

Get the Monitor Stories you care about delivered to your inbox. By signing up, you agree to our Privacy Policy

The benefits could far outweigh the risks, he adds. “There’s this assumption that they see us as occupiers, but if they see us away from our families, taking risks commensurate with the risks they’re taking every day,” that could have a real impact. “As long as we treat them the way we’d treat folks in our own country.”

It wouldn’t hurt, either, to have US troops contributing to the local economy in a way that may be even more tangible than all the US aid dollars the country is getting. “They can see, ‘The US soldiers were respectful, I’m getting to know them – and their money is helping me.”