What you need to know:
- Thousands of people jeered at the group as they were flogged outside a mosque in the capital Banda Aceh.
Aceh is the only province in the world's most populous Muslim-majority country that imposes Islamic law.
Rights groups have derided flogging as cruel and the President Widodo called for an end to public whippings in Aceh.
A group of amorous couples and alleged sex workers were publicly whipped for breaking Islamic law in Indonesia's Aceh Friday, just a week after the province pledged to move the widely condemned practice indoors.
More than a thousand people, including dozens of tourists from neighbouring Malaysia, jeered and screamed abuse at the group as they were flogged outside a mosque in the capital Banda Aceh.
The three men and five women — who included several college students — were found guilty of violating religious law by either showing affection in public or for offering sexual services online, officials said.
Aceh is the only province in the world's most populous Muslim-majority country that imposes Islamic law and flogging is a common punishment for a range of offences — from gambling, to drinking alcohol to having gay sex or relations outside of marriage.
The conservative region on the northern tip of Sumatra island passed a regulation a week ago that would see criminals whipped only behind prison walls.
It was not clear when the new rule would come into effect.
The move was in response to a wave of international criticism over the practice, which has included flogging members of the region's LGBT community and, in some cases, non-Muslims.
Rights groups have derided it as cruel and last year President Joko Widodo called for an end to public whippings in Aceh.
Around 98 per cent of the province's five million residents are Muslims, subject to religious law, including the public whippings which came into practice around 2005.
The new rule has generated protests from conservative groups who see public whippings as having a strong deterrent effect on crime.
Banda Aceh's deputy mayor Zainal Arifin said Friday's flogging was not an act of defiance against the new rules.
"We understand that the regulation has not yet come into effect and the prison is not yet ready to (host floggings) so that is why we are still doing it" in public, he said.
"Until the new regulation is officially in place we will carry on as usual."