KABUL, Afghanistan — The scene that Afghan officials say was caught on video last month near Kabul was as horrific as it was once common in Afghanistan: a Taliban fighter executing a woman with repeated shots to the back of her head as his compatriots and scores of villagers watch, and then cheer.


The crime the woman was accused of: adultery.


The video, which has begun circulating in Kabul, recalls the Taliban’s five-year reign in Afghanistan, when public executions were advertised on the radio and people accused of crimes were shot in front of crowds that packed the capital’s stadium. Adultery was among the crimes punishable by death.


The execution captured on the video took place in the Shinwari district of Parwan Province, in central Afghanistan, less than a two-hour drive from Kabul. It occurred on or around June 23, said Col. Masjidi, a senior provincial police official. Colonel Masjidi, like many Afghans, uses a single name.


The area was once considered safe enough for foreigners to drive through. But security there has sharply deteriorated in recent years, and now even many Afghans think twice before driving on a main road that passes through the district.


In the video, Taliban members can be heard saying that the executioner is the woman’s husband, though Afghan officials offered conflicting accounts of what transpired in the village, Qol-i-Heer.


Colonel Masjidi said the woman’s real husband was a member of a village militia that had slain a local Taliban leader. The woman was executed in revenge on trumped up charges of adultery, he said.


Roshna Khalid, a spokeswoman for the provincial government, said the woman was killed for having multiple affairs with Taliban fighters. Ms. Khalid said the woman’s name was Najiba, and that she was in her 20s and did not have children.


A third official, Qari Abdul Rahman Ahmadi, a member of the provincial council, said the woman had run off with a Taliban commander, who in turn was accused of passing information to government forces.


He was shot in a nearby village before Najiba was moved to Qol-i-Heer to be executed by her husband, Mr. Ahmadi said.


A Taliban spokesman could not be reached for comment. The American Embassy and the NATO-led coalition condemned the execution.


At the outset of the fuzzy video, which runs nearly four minutes and appears to have been taken by a Taliban member with a cellphone, Najiba is a peripheral figure, seen kneeling in the background. Her body is turned away from the camera, her head is shrouded by a gray scarf.


Taliban fighters mill about in the foreground. A few dozen villagers watch from a hill above the impromptu execution ground. The existence of the video was first reported by the Reuters news agency, and obtained on Monday by The New York Times.


One of the Taliban says the Koran prohibits adultery. Killing the woman is “God’s order and decree,” he says. “If the issue was avenging deaths, we would beg for her amnesty. But in this case, God says, ‘You should finish her.’ ”


He concludes by saying, “It’s the order of God, and now it is her husband’s work to punish her.”


Then someone else says, “Give him a Kalashnikov.”


Armed with the borrowed assault rifle, the man identified as her husband approaches Najiba from behind. Several Taliban fighters can he heard whispering, “Get closer to her.”


He shoots Najiba nine times. The third shot jolts her body backward, leaving it flat on the ground. He keeps shooting.


Someone then says, “Long live the hero of Islam!” The Taliban begin cheering, and the villagers join in. One of the Taliban says, “Take my video, too,” and can be seen smiling, with ammunition strapped to his vest.


The video ends with the executioner shooting Najiba’s body four more times.


Ms. Khalid, the provincial spokeswoman, said Afghan security forces were sent to the village after the execution but most of the Taliban had fled. Those who remained were hiding in the houses of villagers, who were too scared of the Taliban to help the security forces, she said.


But an Interior Ministry official in Kabul said at least some of the villagers were in league with the insurgents. The official pointed to the cheering after the execution as evidence that the villagers supported it.


Kabul and other Afghan cities, where many women work and go to school, is not like the countryside, where reports often surface of women being killed over accusations of adultery or other moral crimes, the official said.


“Villagers are more traditional,” the official said.


On Sunday, the coalition said seven service members were killed in two separate roadside bombings in southern and eastern Afghanistan. Six service members died in the attack in the country’s east, an unusually high death toll for a single bombing.


In southern Afghanistan, at least 18 civilians were killed in three bombings along a stretch of road in Kandahar Province on Sunday. The first hidden bomb exploded after a minibus passed over it, said Jawid Faisal, a spokesman for the provincial government. Men from a nearby village then headed to the scene to help survivors on a tractor, which struck a second hidden bomb. A few hours later another vehicle hit a third hidden bomb.