Indonesia's parliament on Tuesday approved a new criminal code that will make sex outside of marriage punishable by up to a year in prison.
It is part of a raft of changes that critics say erode political freedom.
The new criminal code will not come into effect for another three years and also includes a ban on insulting the president and expressing views that run counter to state ideology.
Small groups held protests outside the parliament in Jakarta this week.
The code - which will apply to both Indonesians and foreigners - includes several "morality" laws and makes it illegal for unmarried couples to live together and have sex.
A person's partner or parents can report them for the offence of having sex outside of marriage. Adultery will also be an offence for which people can be jailed.
However the new criminal code also affects other areas of public life and rights groups say it amounts to a crackdown on democratic rights.
The new code includes defamation articles that make it illegal for people to insult the president or express opinions against the national ideology.
But legislators said there were in-built defences for free speech and protests made in the "public interest".
They also praised the achievement of passing a new criminal code, one which had not been thoroughly revised since Indonesia became independent from Dutch rule.
A previous draft of the code was set to be passed in 2019 but sparked nationwide protests with tens of thousands taking part in demonstrations.
Many, including students, took to the streets and there were clashes with police in the capital Jakarta.
Some parts of Indonesia already have strict religion-based laws on sex and relationships.
The province of Aceh enforces strict Islamic law and has punished people for gambling, drinking alcohol and meeting members of the opposite sex.
Latest Stories
-
I want to focus more on my education – Chidimma Adetshina quits pageantry
2 hours -
Priest replaced after Sabrina Carpenter shoots music video in his church
2 hours -
Duct-taped banana artwork sells for $6.2m in NYC
3 hours -
Arrest warrants issued for Netanyahu, Gallant and Hamas commander over alleged war crimes
3 hours -
Actors Jonathan Majors and Meagan Good are engaged
3 hours -
Expired rice saga: A ‘best before date’ can be extended – Food and Agriculture Engineer
3 hours -
Why I rejected Range Rover gift from a man – Tiwa Savage
3 hours -
KNUST Engineering College honours Telecel Ghana CEO at Alumni Excellence Awards
3 hours -
Postecoglou backs Bentancur appeal after ‘mistake’
4 hours -
#Manifesto debate: NDC to enact and pass National Climate Law – Prof Klutse
4 hours -
‘Everything a manager could wish for’ – Guardiola signs new deal
4 hours -
TEWU suspends strike after NLC directive, urges swift resolution of grievances
4 hours -
Netflix debuts Grain Media’s explosive film
4 hours -
‘Expired’ rice scandal: FDA is complicit; top officials must be fired – Ablakwa
5 hours -
#TheManifestoDebate: We’ll provide potable water, expand water distribution network – NDC
5 hours