Banda Aceh (Indonesia) (AFP) Six couples were publicly whipped in Indonesia’s conservative Aceh province Monday for relations outside marriage, with at least two women unable to walk after the painful punishment.

Flogging is common for a range of offences in the region at the tip of Sumatra island, including gambling, drinking alcohol, and having gay sex.

It is the only province in the world’s biggest Muslim-majority country that imposes Islamic law.

The twelve people whipped Monday were arrested late last year during a raid on a hotel in the province’s capital Banda Aceh.

Four people were each flogged seven times after being found with a member of the opposite sex who wasn’t a relation.

The others — who were caught in more compromising positions — received between 17-25 strokes for having intimate relations outside of marriage, an official said.

All 12 also served several months in prison before the public punishment.

Some women cried out in pain as a masked sharia officer lashed them, and at least two had to be carried from the scene by sharia officers.

Dozens of spectators and journalists watched quietly. Some winced occasionally after the blows, while others used smartphones and tablets to film the spectacle.

“This law is designed to have a deterrent effect, not only for the offenders but for the spectators who watch the caning,” said the head of the local public order agency, Marwan, who like many Indonesian goes by one name.

He added: “The pain of being flogged is not that bad, the embarrassment is worse.”

Rights groups have slammed public caning as cruel, and Indonesia’s President Joko Widodo has called for it to end.

But the practice has wide support among Aceh’s mostly Muslim population — around 98 percent of its five million residents practise Islam.

Aceh adopted religious law after it was granted special autonomy in 2001, an attempt by the central government to quell a long-running separatist insurgency.

In December, two men caught having sex with underage girls were whipped 100 times each.