An Indonesian man who is a member of a group that helped draft harsh adultery laws was publically whipped Thursday after he was caught having an affair with a married woman.

Mukhlis bin Muhammad, 46, an Aceh Ulema Council (MPU) member from the Aceh region, was lashed 28 times in the provincial capital of Banda Aceh.

The woman was flogged 23 times.

He flinched and grimaced during the punishment, according to news reports.

HOW IRAN IMPOSES STRICT ADHERENCE TO ISLAMIC LAW WITH SEVERE, INHUMAN PUNISHMENT

"This is God's law. Anyone must be flogged if proven guilty, even if he is a member of the MPU," Husaini Wahab, the deputy mayor of Aceh Besar district, where Mukhlis lives, told the BBC.

Aceh Ulema Council (MPU) member Mukhlis bin Muhammad reacts as he is whipped in public. (Photo by CHAIDEER MAHYUDDIN / AFP) (Photo by CHAIDEER MAHYUDDIN/AFP via Getty Images)

Aceh Ulema Council (MPU) member Mukhlis bin Muhammad reacts as he is whipped in public. (Photo by CHAIDEER MAHYUDDIN / AFP) (Photo by CHAIDEER MAHYUDDIN/AFP via Getty Images)

The news outlet reported the couple were caught in September in a car parked near a tourist beach.

The council works with the local government to draft and implement religious law. Husaini said Mukhlis bin Muhammad will be expelled from the organization.

It was not clear what his role was.

Aceh, a deeply conservative region on Sumatra Island, practices Sharia law, a harsh interpretation of Islam. Offenses deemed punishable by flogging include extra-marital sex, gay sex and gambling.

CLICK HERE TO GET THE FOX NEWS APP