Indonesia's parliament has approved legislation that would outlaw sex outside marriage, in a move critics said was a huge setback to rights in the world's most populous Muslim country.
After the new criminal code was endorsed by all nine parties in a sweeping overhaul of the legal code, deputy house speaker Sufmi Dasco Ahmad banged the gavel to signal the text was approved and shouted "legal".
A revision of Indonesia's criminal code, which stretches back to the Dutch colonial era, has been debated for decades.
Rights groups had protested against the amendments, denouncing a crackdown on civil liberties and political freedoms, as well as a shift towards fundamentalism in Muslim-majority Indonesia, where secularism is enshrined in the constitution.
"We have tried our best to accommodate the important issues and different opinions which were debated," Yasonna Laoly, Minister of Law and Human Rights, told parliament.
"However, it is time for us to make a historical decision on the penal code amendment and to leave the colonial criminal code we inherited behind."
A provision in the text, which still needs to be signed by the president, states the new criminal code will be applicable in three years.
Some of the most controversial articles in the newly passed code criminalise extra-marital sex, as well as the cohabitation of unmarried couples.
According to the text, illegal cohabitation will have a maximum sentence of six months imprisonment, and sex outside of marriage will be punished with one year in prison.
There are also fears these rules could have a major impact on the LGBTQ+ community in Indonesia, where same-sex marriage is illegal.
The spokesperson of the Law and Human Rights Ministry's criminal code bill dissemination team, Albert Aries, defended the amendments before the vote and said the law would protect marriage institutions.
He said acts of extra-marital sex could only be reported by a spouse, parents or children, limiting the scope of the amendment.
The article on extra-marital sex has been criticised by Indonesian business organisations as detrimental to tourism, though authorities insisted foreigners travelling to Bali would not be affected.
At a business conference before the vote this morning, US ambassador to Indonesia Sung Yong Kim said he was concerned about "morality clauses" in the criminal code that can have "negative" impact on businesses.
Before the vote, a shouting match erupted between a politician from the Prosperous Justice Party or PKS and the deputy house speaker.
"Don't be a dictator", shouted Iskan Qolba Lubis, from the Islamist party, after he was prevented from speaking.
Bambang Wuryanto, head of the commission that oversaw deliberations on the text, acknowledged "this is a product by humans and hence it will never be perfect".
But he invited critics to "file a judicial review to the constitutional court" instead of demonstrating.
Rights groups slammed the legislation as morality policing.
"We are going backward... repressive laws should have been abolished but the bill shows that the arguments of scholars abroad are true, that our democracy is indisputably in decline," Amnesty International Indonesia director Usman Hamid said.
About a hundred people protested against the bill yesterday and unfurled a yellow banner that read "reject the passing of the criminal code revision", with some dropping flower petals on the banner as is done for a funeral.
Another protest to reject the new law was scheduled to be held today in front of the parliament building.