An Afghan court has sentenced a mullah to 20 years in prison after finding the religious teacher guilty of raping a 10-year-old girl.

The sentence, passed by a Kabul judge on Saturday, has been welcomed by family as well as women’s support groups as a rare victory in their fight for justice for female victims of sex crimes. Rape is often treated as adultery in Afghanistan, and victims can face prison themselves.

Hassina Sarwari, who runs a shelter for women in northern Kunduz province, where the rape took place, said on Sunday that if the trial had not been transferred to Kabul the result would probably have been very different.

The rape took place in May at a mosque in a village near the provincial capital, also called Kunduz.

“If the case would have not been transferred to Kabul, we were so worried that the mullah would have not been punished in Kunduz for his crime,” said Sarwari. When she saw the girl for the first time in the hospital she was in a very bad condition and required transfer to Kabul for additional treatment she said.

Kunduz police spokesman Sayed Sarwar Hussaini said his colleagues were shocked at first to hear the story but acted immediately to apprehend the mullah. “We sent a police unit to make the arrest, and we caught mullah Mohammad Amin while he was trying to flee,” he said.