Three couples were publicly caned in Indonesia's Aceh today after the unmarried university students were caught spending time alone together in violation of the province's strict Islamic laws.

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.

Public caning is a common punishment in Aceh, which is the only province in the world's most populous Muslim-majority country that is allowed to implement Islamic sharia law, but it is rare for women to be caned.

More than 90 per cent of Indonesians describe themselves as Muslim, but the vast majority practise a moderate form of the faith.