A 20-year-old Indonesian woman was rushed to a hospital Monday after being publicly caned for violating Sharia law by allegedly having affectionate contact with a man who was not her husband.

The caning of students Nur Elita and Wahyudi Saputra happened in front of a cheering crowd outside a mosque in Banda Aceh, the only province in Indonesia that operates under Sharia law, the Jakarta Post reports.

Elita, who received five strokes along with Saputra, 23, had to be carried to an ambulance by officials following her punishment.

“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, according to the Antara news agency.

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

Four other men were caned for gambling.

In September, 34 people were caned in public in Aceh province. The alleged offenses, like for the latest canings, were gambling and affectionate contact between an unmarried couple, also known as khalwat.

The Aceh province implemented a Sharia-based law system in 2003 following the awarding of a special autonomy status, the Jakarta Post reports.