Pictures from Banda Aceh show a man collapsed on a stage after he collapsed from being caned.
He was given the punishment by a religious officer for spending time in close proximity with a woman who was not his wife, which is against Sharia Law.
He was later carried off the stage, set up outside a mosque in the capital of Indonesia, by several police officers.
A woman was also caned after being forced to get to her knees in front of hundreds of people.
Aceh is the only province in the world’s most populous Muslim-majority country that imposes sharia law.
People can face floggings for a range of offences – from gambling, to drinking alcohol, to gay sex.