Nur Elita
Nur Elita screams during caning as part of her sentence in the courtyard of Baiturrahim mosque in Indonesia's Aceh provinceReuters

Hundreds of people gathered to cheer as a woman was publicly caned in Indonesia for having affectionate contact with a man who was not her husband. University student Nur Elita was rushed to hospital after receiving five lashes in front of a jubilant crowd.

The 20-year-old was forced to kneel as a masked man whipped her repeatedly outside the Baiturrahim Mosque in Aceh, Indonesia's only province to enact Sharia law. Her companion, 23-year-old Wahyudi Saputra was also caned. Under Sharia law, unmarried men and women are not allowed to get too close to each other due to the "khalwat" offence.

"Take these punishments as a lesson. What has been done by these convicts should not be taken as an example," said Banda Aceh Deputy Mayor Zainal Arifin. "And to the public, I ask that you do not isolate those who have been convicted here today. And also, those who have been convicted are reminded not to repeat the same mistakes," he added.

Elita could be seen doubling over in agony as she was brutally whipped. After the punishment was meted out, she was carried from the stage to an ambulance and transported to hospital to receive treatment.

An additional four men also received five lashes each for gambling, which is a crime under Sharia law. Earlier this year, a district in the conservative Aceh province invoked a bylaw requiring schools to teach boys and girls separately, while another city in the region previously barred female passengers from straddling a motorcycle when riding with a male driver.