A rowdy crowd of about 1,000 spectators shouted as the three men and three women, aged between 18 and 23, were lashed several times each with a rattan cane in a square in Banda Aceh, the capital of Aceh.
A fourth woman, aged in her 40s, was also publicly caned for committing adultery. One of the women fainted after being caned four times and had to be carried off by officials.
"Hopefully those who are being caned will realise their mistakes and feel remorseful and repent to God so that they can become noble humans again," Ridwan, an official from the local Islamic sharia law office who goes by one name, said before the caning.
More than 90 per cent of Indonesians describe themselves as Muslim, but the vast majority practise a moderate form of the faith.