It all began when a group of eight men raided a woman’s home last week and caught a 25-year-old widow with a married man. Accusing them of adultery, the vigilantes, who included a 13-year-old boy, beat up the 40-year-old man, gang-raped the woman and doused the two with sewage before turning them over to the Shari‘a police.

Despite what happened, the Shari‘a police in Langsa, in the Indonesian province of Aceh, said it wouldn’t show any leniency and insisted the woman, along with her companion, would be caned in public for alleged adultery.

“They violated the religious bylaw on sexual relations,” the local Shari‘a police chief Ibrahim Latif told local media on Tuesday. “They have to be [caned] as a form of justice. The rapists will also be processed, but in a criminal court.”

Social media exploded with public condemnation. “Gang-raped, then caned? Oy Aceh shariah law enforcers, you are the ultimate gag-inducing misogynistic donkeys,” remarked one Indonesian Twitter user. “Inhumane,” said another.

The latest controversy came just days after the Sultanate of Brunei began its rollout of the Shari‘a penal code — the first country in East Asia to do so — and as the Pan-Malaysian Islamic Party pushes to implement it in the Malaysian state of Kelantan.

Yet, not all Muslims agree with the fundamentalist applications of Shari‘a being advocated in those jurisdictions.

“Implementing Shari‘a that is understood literally tends to produce decisions that hurt human dignity, for example violating human rights,” Indonesian Islamic scholar Akhmad Sahal says, adding that women, the poor and non-Muslims are especially vulnerable. Women’s-rights activists in Aceh say Shari‘a contributes to the high level of abuse and violence toward women, who also tend to get heavier punishments than men.

Jakarta allowed Aceh, famed for its strong Islamic roots, to adopt Shari‘a in 2001 in an attempt to quell a decades-long separatist conflict. The heaviest penalty is public caning, which first took place in 2005 (the death-by-stoning penalty for adulterers was dropped from a draft bylaw in March). Since February this year, both Muslims and non-Muslims have been obliged to follow the Islamic law. On a day-to-day level, that means prohibitions on alcohol, close proximity with members of the opposite sex besides one’s spouse, gambling and homosexuality.

Shari‘a also regulates dress code, requiring women to cover their hair and banning them from wearing tight pants. Some areas enforce additional rules: in the town of Lhokseumawe, female passengers are banned from riding astride motorcycles and have to sit sidesaddle. In North Aceh, women are prohibited from dancing in public, and that includes traditional dances.

An Acehnese Islamic leader, Faisal Ali, has condemned the gang rape. “The rapists have to be punished more severely because they have abused the implementation of Shari‘a,” he said.

Yet, enforcement of Shari‘a often leads to violence and tragedy precisely because of the behavior of overzealous officials and vigilantes. In 2010, three Shari‘a policemen raped a 20-year-old university student after they caught her riding a motorbike with her boyfriend. In 2012, Shari‘a police accused a 16-year-old schoolgirl at a concert of being a prostitute. The accusation was reported in local Aceh media — and the teenager killed herself.

Despite moral zealotry, Aceh is plagued with social ills. The province is a hotbed of corruption, and the religious police are far from immune. In November, the head of the province’s Shari‘a police was arrested over charges of corruption. In September, a Shari‘a police officer was detained for allegedly trying to supply hashish to a jailed inmate.

“Implementing Shari‘a is often a mask to cover up a regime that is immoral or corrupt or cruel,” Sahal says. “Real problems like corruption escape public attention.”

Contact us at letters@time.com.