Harrowing images have emerged of an Indonesian woman crying and burying her head in her hands after being caned by a religious officer for breaching Sharia law.

The woman is believed to be from the city of Banda Aceh in the Aceh region on the island of Sumatra. It is the only place in the world’s most populated Muslim-majority country, where Sharia law is imposed.

The woman was canned 26 times on a stage and in front of a crowd of people. Her crime was spending time in close proximity with a man, who is not her husband.

She was also alleged to have had sex outside marriage.

Woman caned in public for breaking Sharia law Show all 4 1 /4 Woman caned in public for breaking Sharia law Woman caned in public for breaking Sharia law A Sharia law officer punishes a woman accused of cheating on her husband by whipping her on stage in public in Bandah Aceh. CHAIDEER MAHYUDDIN/AFP/Getty Images) Woman caned in public for breaking Sharia law A religious officer canes an Acehnese woman for spending time in close proximity with a man who is not her husband, which is against Sharia law, in Banda Aceh. CHAIDEER MAHYUDDIN/AFP/Getty Images) Woman caned in public for breaking Sharia law An Indonesian woman known as Linda is examined by a doctor and officials after being caned for spending time in close proximity with a man who is not her husband, which is against Sharia law, in Banda Aceh. Aceh is the only province in the world's most populous Muslim-majority country that imposes sharia law. People can face floggings for a range of offences -- from gambling, to drinking alcohol, to gay sex Getty Images Woman caned in public for breaking Sharia law An Indonesian woman known as Linda is helped by two Sharia officials after being caned for spending time in close proximity with a man who is not her husband, which is against Sharia law, in Banda Aceh. Aceh is the only province in the world's most populous Muslim-majority country that imposes sharia law. People can face floggings for a range of offences -- from gambling, to drinking alcohol, to gay sex Getty Images

Pictures of a man being canned afterwards suggest her alleged partner was also publicly flogged.

Since the Aceh region gained special autonomy from the Indonesian authorities in 2001, it began to impose Sharia law.