An Acehnese man collapses as he was getting caned by a religious officer, for spending time in close proximity with a woman who is not his wife, which is against Sharia law, in Banda Aceh on February 27, 2017.  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. / AFP PHOTO / CHAIDEER MAHYUDDINCHAIDEER MAHYUDDIN/AFP/Getty Images
A man collapsed after being caned by a religious officer (Picture: AFP)

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.

An Acehnese man gets carried away after he collapsed while getting caned by a religious officer, for spending time in close proximity with a woman who is not his wife, which is against Sharia law, in Banda Aceh on February 27, 2017.  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. / AFP PHOTO / CHAIDEER MAHYUDDINCHAIDEER MAHYUDDIN/AFP/Getty Images
He had to be helped from the stage by security officials (Picture: AFP)

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.

An Acehnese woman gets caned by a religious officer, for spending time in close proximity with a man who is not her husband, which is against Sharia law, in Banda Aceh on February 27, 2017.   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. / AFP PHOTO / CHAIDEER MAHYUDDINCHAIDEER MAHYUDDIN/AFP/Getty Images
A woman was also caned outside the mosque (Picture: AFP)