Tourists visiting Indonesia will not be charged under a new law which will criminalise sex outside marriage, officials say.
Dubbed the "Bali bonking ban", the new legislation threatens up to a year in jail for unmarried couples who have sex or six months for those who cohabit.
But the governor of Bali, a holiday hotspot, said authorities would not check the marital status of tourists.
The law is set to take effect in three years but could face legal challenges.
The new legislation is part of a raft of changes to the criminal code, which come after a rise in religious conservatism in the Muslim-majority country.
Although the ban on extra-marital sex has grabbed most attention abroad, many inside Indonesia worry that other parts of the new code will be more damaging, for example making it a crime to criticise the president or vice-president.
The UN says the new laws could erode human rights in the country, but Indonesian officials maintain that the legislation will uphold "Indonesian values".
Businesses are concerned that the changes will hit Indonesia's tourism industry by making the country a less attractive destination while it is still trying to recover from the devastating Covid pandemic.
In 2019, more than 16 million people visited Indonesia.
While the law would technically apply to locals and foreigners, officials have tried to play down fears of tourists being prosecuted.
"Bali is Bali as usual, which is comfortable and safe to be visited," said Bali Governor Wayan Koster.
Visitors will not be required to prove their marital status when checking into accommodation, and local officials will not carry out checks, Mr Koster said.
Indonesia's deputy justice minister promised foreigners would not be prosecuted.
The government also points out that according to the new criminal code, extra-marital sex and cohabitation offences would only be prosecuted if reported by a spouse, parent or child. The provision makes it unlikely that tourists will be affected, officials insist.