A Muslim cleric in Indonesia has been caned 28 times in public for breaking a religious law on adultery that he helped draft.

Mukhlis bin-Muhammad is a member of Aceh's Ulema Council, the Muslim organisation that helped the provincial government draft its religious laws.

Conservative Aceh is the only province in Indonesia that applies Sharia law.

He was caned 28 times in public for having sexual relations with a married woman.

The woman was flogged 23 times.

"The implementation of Islamic Sharia should be in all aspects of life, government and community without exception," Banda Aceh assistant major Bachtiar said.

Canings have become common in Aceh for offences including theft and gambling since they were introduced in 2005.

The province outlawed homosexuality in 2014.

Groups like Amnesty International say the laws are a violation of human rights and should be discontinued.

ABC/Reuters