There were conflicting accounts that the doctor had been killed or that he had been severely injured and sent out of Afghanistan for treatment. The woman was initially feared missing, but was later reported to be at a women’s shelter, according to an official there.

The attack took place in Sar-i-Pul, a government-held town in the northern province of the same name, on Tuesday, but news was slow to leak out and officials initially denied that anyone had been hurt.

The provincial police chief, Abdul Raouf Taj, said that local villagers and shopkeepers stormed the private clinic when they heard that the doctor, Ajmeer Hashimi, was treating a patient, a midwife named Mahboba, alone in his examining room.

In many parts of Afghanistan, particularly in remote areas, women are customarily not allowed to be examined by male doctors except in the presence of close male family members as their chaperons. Stoning is the punishment for adultery under Shariah law, and many Afghan clerics approve of it, although it is officially outlawed here.