The parliament of Indonesia has approved a new criminal code that prohibits people from engaging in sex outside marriage.
According to the BBC, the parliament unanimously approved the new codes of over 600 articles on Tuesday.
The new laws which will take effect in three years, state that anyone caught having extramarital sex will face up to a year jail term.
It also bans couples from living together before marriage, an act that attracts a six-month jail term.
Adultery has also been stated as an offence for which people could be jailed.
The amended code also bans the promotion of contraception, insulting the sitting president, and spreading views counter to the secular national ideology.
It is believed the change in the laws came as a result of the rise in religious conservatism in the Muslim-majority country.
The laws apply to indigenes, foreigners living in the country, as well as visitors to holiday destinations such as Bali.
It also stated that for the prosecution to take place, the complaint must be filed by either the spouse, parents, or children of the accused couple.
The development has attracted a chorus of condemnation from critics who have described the laws as a “disaster for human rights”.
Some groups have protested against the legislation and are expected to challenge the laws in court while a number of advocates hailed it as a victory for the country’s LGBTQ minority
Sex before marriage was not illegal in Indonesia before the code was passed, although adultery was.