Farkhunda had one chance to escape the mob that wanted to kill her. Two Afghan police officers pulled her onto the roof of a low shed, above the angry crowd.

But then the enraged men below her picked up poles and planks of wood, and hit at her until she lost her grip and tumbled down.

Her face bloodied, she struggled to stand. Holding her hands to her hair, she looked horrified to find that her attackers had yanked off her black hijab as she fell. The mob closed in, kicking and jumping on her slight frame.

The tormented final hours of Farkhunda Malikzada, a 27-year-old aspiring student of Islam who was accused of burning a Quran in a Muslim shrine, shocked Afghans across the country. That is because many of her killers filmed one another beating her and posted clips of her broken body on social media. Hundreds of other men watched, holding their phones aloft to try to get a glimpse of the violence, but never making a move to intervene. Those standing by included several police officers.

Unlike so many abuses against Afghan women that unfold in private, this killing in March prompted a national outcry. For Farkhunda had not burned a Quran. Instead, an investigation found, she had confronted men who were themselves dishonoring the shrine by trafficking in amulets and, more clandestinely, Viagra and condoms.

At first, the trial and convictions that followed seemed a victory in the long struggle to give Afghan women their due in a court of law. But a deeper look suggests otherwise. The fortuneteller who several investigators believe set the events in motion was found not guilty on appeal. The shrine’s custodian, who concocted the false charge of Quran burning and incited the mob, had his death sentence commuted. Police officers who failed to send help and others who stood by received slaps on the wrist, at most. Some attackers identifiable in the videos avoided capture altogether. Afghan lawyers and human rights advocates agree that most of the accused did not receive fair trials. Farkhunda’s family, fearing reprisals and worried that the killers would not be held accountable, fled the country.