The Indonesian Parliament has approved legislation that will ban sex outside marriage with a punishment of up to one year in jail.
The law will apply to Indonesians and foreigners alike and also prohibit cohabitation between unmarried couples.
It will also ban insulting the President or state institutions, spreading views counter to the state ideology, and staging protests without notification.
The new criminal code, which was approved unanimously by parliament on Tuesday, replaces a framework that had been in use since independence in 1946 and was a mix of Dutch law, customary law known as hukum adat, and modern Indonesian law.
“We have tried our best to accommodate the important issues and different opinions which were debated. However, it is time for us to make a historical decision on the penal code amendment and to leave the colonial criminal code we inherited behind,” Yasonna Laoly, minister of law and human rights, told parliament ahead of the vote.
A provision in the text that is yet to be signed by the President states that the code will be applicable in three years.