Indonesia's parliament has approved a new criminal code that bans anyone in the country from having extramarital sex and restricts political freedoms, APA reports citing BBC.
Sex outside marriage will carry a jail term of up to a year under the new laws, which take effect in three years.
The raft of changes come after a rise in religious conservatism in the Muslim-majority country.
Critics see the laws as a "disaster" for human rights, and a potential blow to tourism and investment.
Several groups of mainly young people protested against the legislation outside parliament in Jakarta this week. It is expected the new laws will be challenged in court.
They apply equally to locals and to foreigners living in Indonesia, or visiting holiday destinations such as Bali. Under the laws, unmarried couples caught having sex can be jailed for up to a year.
They are also banned from living together - an act for which people could be jailed for up to six months. Adultery will also be an offence for which people can be jailed.
Sex before marriage was already banned prior to the approval of this new criminal code, but the law was often not enforced.
The old law defined adultery as sex between a married man and someone who was not his wife, while the new law bans all sex outside of marriage, including between unmarried couples. The sentencing for those caught has also been increased from nine months to a year.
Supporters of the new legislation say changes were made to accommodate concerns of critics - for prosecutions to start a complaint must be filed by the children, parents or spouse of the accused couple.
Ajeng, a 28-year-old Muslim woman living in the West Java city of Depok, said she was now at risk for living with her partner for the past five years.
"With the new law, both of us can go to jail if one of the family decides to make a police report," she told the BBC.
"What if there's one family member who has a problem with me and decides to send me to jail?
"I think living together or having sex outside of marriage is not a crime. In my religion, it's considered a sin. But I don't think the criminal code should be based on a certain religion."
She said she had joined the nationwide protests in 2019 when the law had first been broached. She took the sign: "For the right to cuddle, I took to the streets."
However on Tuesday, parliament unanimously approved the new code of over 600 articles.