(Bloomberg) -- Indonesia’s new criminal code outlawing sex outside marriage and potentially curbing free speech will apply to citizens and foreigners in the country, spurring uncertainty among tourists and expatriates.

Critics have decried that the new laws infringe on people’s personal lives and attempts to prevent criticism of the government, a setback for the country’s democracy that could mar its investment climate. The law could also deter foreign travel, which may undermine economic recovery in tourism-reliant places like Bali that are just rebounding since the pandemic.

The country has sought to assure foreigners that their privacy would be upheld and they shouldn’t worry about being prosecuted unless their family members file a complaint. “So, if people from Australia want to go on a holiday in Bali, and they want to stay in the same room whatsoever, that is their personal matter,” Law and Human Rights Minister Yasonna Laoly said on Wednesday. 

Here’s what you need to know about the new laws:

What are the new rules on sex outside marriage?

Anyone engaged in sex outside marriage may face up to one year in prison or fines. Anyone cohabiting as husband and wife outside marriage may face up to six months in prison. In both cases, the police can only prosecute people based on official complaints made by their parent, child or spouse. 

Does the new code outlaw sex work?

The code doesn’t specify sex work but the ban on extramarital sex would effectively make sex work or prostitution illegal.

What about LGBTQ relationships?

The code would effectively criminalize LGBTQ relationships. The government doesn’t recognize same-sex marriages, so any sexual activity between people of the same gender would be considered extramarital.

When will the new criminal code come into effect?

There will be a three-year transition period until the law is fully in place, as the government must draft implementing regulation. Now that parliament has passed the bill, the next step is for President Joko Widodo — better known as Jokowi — to sign off. He is widely expected to approve it.

How strictly will the rules be enforced?

It’s unclear whether couples traveling to Indonesia and staying in hotels will be scrutinized and penalized, although government officials have sought to assure foreigners that their privacy would be upheld. 

Deputy Minister of Law and Human Rights Edward Omar Sharif Hiariej said that authorities will only act if there’s a complaint and raids will not be carried out. The criminal code recognizes “living laws,” which includes the strict Shariah legislation, that means local governments across 34 provinces can enact their own laws based on the criminal code.

Will the law be enforced in Bali?

The criminal code applies to the entire country, including Bali, but each province can enforce their own laws based on the code. The new laws could become controversial there, given the island’s reliance on tourism.

What other contentious laws are in the new code?

Foreigners could run afoul of other provisions in the criminal code. It penalizes people who insult the president, vice-president and the government. The code also punishes abortion but makes exceptions when it comes to medical emergencies or rape.

How strong is the opposition to the code?

Small protests have already taken place in capital city Jakarta. Civil rights organizations are planning to file a legal challenge to the constitutional court. When parliament introduced its first draft of the bill in 2019, days of violent demonstrations erupted, prompting Jokowi to delay the legislation in order to get more feedback from the public. 

(Adds Indonesia’s minister comments in third paragraph.)

©2022 Bloomberg L.P.