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
-
We have a bad technical team; Otto Addo and his team should go – Ernest Thompson
49 mins -
Hindsight: Why Accra Lions’ present problems do not define them
1 hour -
10-year-old Lisa Laryea arrives at Wits Donald Gordon Hospital in South Africa for bone marrow transplant
2 hours -
23 ambassadors inducted to take on 2025 GSTEP Challenge in three regions
2 hours -
Ghana Shea Workers Union inaugurated
2 hours -
I trust Bawumia; he has never lied to me – Akufo-Addo
2 hours -
Bawumia is hardworking; offers the youth platform to share ideas – Kow Essuman
2 hours -
IGP, Police commanders worship with churches in Ghana as part of security arrangements for 2024 elections
3 hours -
Mahama is a failed president; give Bawumia a chance – Akufo-Addo to Ghanaians
3 hours -
‘No child left behind in Free SHS’ – Akufo-Addo declares
3 hours -
MMDAs tasked to pay more attention to TB cases
3 hours -
2024/25 GPL: Defending champions Samartex suffer second consecutive loss as Basake Holy Stars wins 1-0
3 hours -
Government stands firm in Galamsey fight, says Akufo-Addo
3 hours -
National Peace Council assures public of violent free elections
3 hours -
Agenda 111 to be discontinued if NDC comes to power – Akufo-Addo
3 hours