KABUL, Afghanistan — Angry villagers stoned to death a local Taliban commander and his bodyguard in southern Afghanistan Sunday after the militants killed a 60-year-old man accused of aiding the government, Afghan officials said.

It was a rare reversal of brutality aimed at the Taliban and, some Afghan officials believe, suggests a growing sense of security in an area where the insurgency has lost ground to NATO forces in the last two years. The stoning happened in the Nawa District of Helmand Province, a verdant agricultural area along the Helmand River Valley, now considered one of the safest places in the volatile south as a result of a heavy influx of American troops and aid dollars.

“People won’t tolerate the Taliban’s barbaric actions anymore,” said Dawoud Ahmadi, a spokesman for the governor of Helmand Province. “They will stand against them whenever they are harmed.”

The stoning occurred a day after insurgents in the northeastern province of Kunar stoned, hanged and shot two Afghan National Army soldiers returning from leave, Afghan officials said. The attacks were unrelated and happened far away from each other, but they underscored the grisly nature of the insurgency even as NATO officials say overall violence in the country is beginning to show a sustained downward trend for the first time in five years.