Images have emerged of a young woman crying out in pain while she is caned 23 times in front of a cheering crowd in the Indonesian province of Aceh. She was accused of standing too close to her boyfriend.

A total of 13 people, including seven men and six women between the ages of 21 and 30, were caned outside a mosque in the provincial capital Banda Aceh, according to AFP.

Six couples faced the punishment for being intimate while unmarried in the province, which operates under strict Islamic codes.

READ MORE: Indonesia approves chemical castration, capital punishment for pedophiles

One man who remains unnamed, was flogged for reportedly spending time with a woman in a secret location which, according to the laws, could lead to adultery.

Another young woman was granted temporary respite because she is pregnant, however, Zainal Arifin, the deputy mayor of Aceh, reassured the public that “the punishment will be handed down after she gives birth.”

Arifin also said he hoped the public punishment would set a clear example and act as a deterrent. “We hope there are no more people in Banda Aceh who break the law in future,” he added.

More women are being flogged in Aceh than ever before, according to AFP. The northern province, which is located on the island of Sumatra, began enforcing Sharia law after the area was granted special autonomy in 2001. The consumption and sale of alcohol is illegal in the province.

Indonesia is the most populous Muslim-majority country in the world and recognizes only five other faiths – Protestantism, Roman Catholicism, Hinduism, Buddhism and Confucianism.

READ MORE: Teen attacks priest with ax, attempts to detonate bomb in crowded Indonesian church