An Indonesian teen is caned in public in Banda Aceh as punishment for being caught cuddling with her boyfriend.
CNN  — 

Two 18-year-olds were publicly flogged Thursday in the conservative Indonesian state of Aceh for displaying affection.

The college student and her boyfriend each received 17 lashes for publicly cuddling, which is a violation of the state’s strict interpretation of Sharia law, according to a government spokesman.

The punishments were administered in front of a mosque in the provincial capital Banda Aceh.

Video of the event shows a masked individual striking the two teenagers, one after the other, across the upper back in front of a crowd, members of which were taking cellphone videos.

The woman's boyfriend, also a teenager, is whipped as punishment for the public affection.

A 35-year-old man was also whipped 20 times, as part of his punishment for being “intimate” with a woman in a grocery store which she owned.

The 40-year-old woman involved in the incident avoided the caning – for now – after medical professionals deemed her unfit to undergo physical punishment. That part of her sentence has been postponed.

The man and two teenagers had all served 98-day jail sentences ahead of the corporal punishment.

Strict Islamic laws

Unlike the rest of Indonesia, Aceh province follows strict Islamic laws, which make sexual activity outside marriage illegal and prohibit same-sex relations.

The state’s Sharia criminal code went into effect in September 2015. Aceh is the only one of Indonesia’s 34 provinces that can legally implement Sharia, according to rights advocacy group Human Rights Watch.

In recent months, the conservative province has flogged numerous people for un-Islamic activities, including gay sex, adultery and drunkenness.

Last summer, 15 people, including five women, were punished with public caning for violating Sharia law.

Two men accused of being gay received 87 lashes each for gay sex, while nine others were sentenced up to 26 lashes for adultery. Four people were caned for being drunk, including one woman who received 27 lashes.

At the time, the governor of the province, Irwandi Yusuf, decreed that corporal sentences be carried out within the city’s prison.

However, the head of Banda Aceh’s religious police, Muhammad Hidayat, said that the recent sentences were carried out publicly because of a lack of detailed instructions concerning the decree.

CNN’s Edy Amin contributed to this report.