An Indonesian man who helped draft strict adultery laws has been publicly caned after being caught having an affair with a married woman.

Mukhlis bin Muhammad, 46, of the Indonesian Aceh Ulema Council (MPU) was flogged 28 times and the woman who he had the affair with was thrashed 23 times.

The man is from the Aceh region which is the only place in Indonesia that practices Islamic Sharia law.

Other offences in the region punishable by caning include gay sex, drinking alcohol and gambling.

Deputy mayor of Aceh Besar district, Husaini Wahab, told BBC News Indonesia: "This is God's law. Anyone must be flogged if proven guilty, even if he is a member of the MPU."

Mount Sinabung: Indonesia braces for further eruptions Show all 6 1 /6 Mount Sinabung: Indonesia braces for further eruptions Mount Sinabung: Indonesia braces for further eruptions A man carries a child as he watches Mount Sinabung spewing volcanic ash AP Mount Sinabung: Indonesia braces for further eruptions Mount Sinabung erupted for nine minutes on Sunday Sinarisa Sitepu / Reuters Mount Sinabung: Indonesia braces for further eruptions Nearby residents have been warned to stay indoors as the country braces for further eruptions AFP/Getty Mount Sinabung: Indonesia braces for further eruptions The column of volcanic ash was around 7km tall EPA Mount Sinabung: Indonesia braces for further eruptions Mount Sinabung volcano spews thick volcanic ash near the village of Karo in North Sumatra AFP/Getty Mount Sinabung: Indonesia braces for further eruptions An Indonesian man cleans the street as Mount Sinabung spews volcanic smoke, as seen from Tiga Pancur Village EPA

Mr Husaini added that Mr Mukhlis will be expelled from the MPU following the public caning - although it is not immediately clear what the man did for the organisation.

He also claimed that flogging a council member showed their commitment to enforcing Islamic law.

Mr Mukhlis is also a religious leader and is the first leader to be caned in Aceh since the strict law was introduced in 2005.

Although the pair were flogged on Thursday, they were caught by officials in September allegedly in a parked car next to a tourist beach.

Also on Thursday, a female university student was flogged a dozen times after she was caught spending the night in a boarding house with a man. However, the man escaped punishment because he is underage. ​