Mukhlis bin Muhammad, 46, was from the Aceh Ulema Council (MPU) which advises the implementation of strict Islamic sharia law in the conservative region of the world’s most populous Muslim country.

After officials caught him and a married woman in a car parked near a tourist beach, he was flogged 28 times in public on Thursday and expelled from the MPU, according to the BBC.

He is the first religious leader to face such a punishment since the strict Islamic laws were introduced into the Aceh region in 2005, where those caught engaging in gay sex and gambling can also be caned.

Husaini Wahab, the deputy mayor of Aceh Besar district, told AFP: “This is God’s law. Anyone must be flogged if proven guilty, even if he is a member of the MPU.” The woman Mukhlis was caught with was caned 23 times.

“A lot of things we can learn, but ultimately we have to enforce God’s laws, especially on Islamic land like here,” Banda Aceh resident, Muhammad Ramdan, said, according to CNN.

The dispensation given to Aceh to inflict such punishment has been criticized internationally with Amnesty International saying in 2018 that it is not right that couples who simply show affection in public as well as sex workers are punished in an act of “utmost cruelty.”

Canes are usually made from rattan and are used on an open air platform, although children are not allowed to watch the punishment.

Amnesty International Indonesia Executive Director Usman Hamid said: “Caning is an inhuman and degrading form of punishment that may amount to torture which should never be used in any circumstances.

“It is also high time for the international community to press Indonesia to provide a safer environment for everyone in Aceh. The situation risks deteriorating rapidly unless the local administration is pushed to take its obligations to respect human rights seriously.”

This week, a female university student in Aceh caught spending the night in a boarding house with a man was flogged a dozen times in a punishment witnessed by dozens of people, The Guardian reported.

Back in July, three people were flogged 100 times after being convicted of having premarital sex, while last year two men who were caught having sex with under-age girls were also whipped 100 times, the publication reported.