Three couples have been publicly caned in Indonesia's Aceh after the unmarried university students were caught spending time alone together in violation of the province's strict interpretation of Sharia.

A rowdy crowd of about 1,000 spectators shouted as the three men and three women, aged between 18 and 23, were lashed on Friday 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 sharia law office who goes by one name, said before the caning.

RELATED: The heavy hand of religious police in Aceh

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, but it is rare for women to be caned.

Gay sex, gambling and drinking alcohol are already punishable by caning in Aceh which began implementing sharia after being granted special autonomy in 2001, an effort by the central government in Jakarta to quell a long-running separatist rebellion.

A flurry of strict Islamic Sharia have been introduced in Aceh in recent years, drawing howls of protest from rights groups.

Just this week, Banda Aceh banned women from entertainment venues after 11pm unless they are accompanied by a husband or male family member and last month an Aceh district banned unmarried men and women from riding together on motorbikes.

More than 90 percent of Indonesians describe themselves as Muslim.