One woman begged for mercy and another sobbed uncontrollably as Indonesia's Aceh province flogged nearly a dozen people Thursday, including a Buddhist man, charged with breaking local Islamic law.

Despite widespread criticism, public whipping is a common punishment for a range of offences in the deeply conservative region at the tip of Sumatra island, including gambling, drinking alcohol, and having gay sex or relations outside of marriage.

Aceh is the only region in the world's biggest Muslim-majority country that imposes Islamic law.

On Thursday, dozens watched as eleven people were whipped outside a mosque in the provincial capital Banda Aceh.

A masked sharia officer rained down between eight and 32 strokes from a rattan cane on their backs after they were caught with members of the opposite sex.

The six men and five women -- all in their late teens and early twenties -- were rounded up by religious officers who caught them behaving amorously, a crime under local law.

Authorities gave few details, but couples have been whipped in the past for cuddling or holding hands in public.

One 19-year-old woman caught in an unidentified building with a man burst into tears as the whipping started, while another woman begged for the punishment to stop.

A Buddhist man caught with a woman inside a hotel room got more than two dozen lashes.

About 98 percent of Aceh's five million residents are Muslims subject to religious law, known locally as Qanun.

While it's relatively rare, non-Muslims who have committed an offence can choose to be prosecuted under Islamic law, sometimes to avoid a prison sentence.

On Friday, Banda Aceh's mayor Aminullah Usman warned hotels and businesses to comply with the region's conservative regulations -- or risk losing their license to operate.

"We've warned hotels to not even think about breaking the rules" by renting rooms to unmarried couples, he told reporters after the flogging.

"Otherwise, we will revoke their licenses," he added.

Story continues

The whipping came a day after three people in Lhokseumawe, a district a few hours from Banda Aceh, were flogged 100 times each for having premarital sex, including a 19-year-old man who had relations with an underage girl.

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

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 population.