JAKARTA, Indonesia — Indonesia’s Parliament has passed a long-awaited and controversial revision of its penal code that criminalizes extramarital sex and applies to citizens and visiting foreigners alike. A parliamentary taskforce finalized the bill in November and lawmakers unanimously approved it Tuesday.

After ratification, the new criminal code must be signed by the president, according to Deputy Minister of Law and Human Rights Edward Hiariej. The criminal code will not apply immediately, but takes a maximum of three years to transition from the old code to the new one.

“That (the new Criminal Code) has a lot of implementing regulations that must be worked out, so it’s impossible in one year, but remember the maximum (transition period) is three years,” Hiariej said.

A copy of the amended criminal code obtained by The Associated Press includes several revised articles that make sex outside marriage punishable by a year in jail and cohabitation by six months, but adultery charges must be based on police reports lodged by their spouse, parents or children.

It also says the promotion of contraception and religious blasphemy are illegal, and it restores a ban on insulting a sitting president and vice president, state institutions and national ideology. Insults to a sitting president must be reported by the president and can lead to up to three years in jail.

Hiariej said the government provided “the strictest possible explanation that distinguishes between insults and criticism.”

The code maintains that abortion is a crime, but it adds exceptions for women with life-threatening medical conditions and for rape, provided that the fetus is less than 12 weeks old, in line with what is already regulated in the 2004 Medical Practice Law.

Criticism

Rights groups criticized some proposed revisions as overly broad or vague and warned that rushing them into the new criminal code could penalize normal activities and threaten freedom of expression and privacy rights.

However, some advocates hailed it as a victory for the country’s LGBTQ minority. Lawmakers during a fierce deliberation session eventually agreed to repeal an article proposed by Islamic groups that would have made gay sex illegal.

The code would also preserve the death penalty within the criminal justice system despite calls from the National Commission on Human Rights and other groups to abolish capital punishment, as dozens of other countries have done.

The penal code had languished for decades while legislators in the world’s biggest Muslim-majority nation struggled with how to adapt its native culture and norms to the criminal code, a living legacy of the Dutch colonial administration.

A previous bill was poised for passage in 2019, but President Joko Widodo urged lawmakers to delay a vote on the bill amid mounting public criticism that led to a nationwide protests when tens of thousands of people took to the streets. Opponents had said it lacked transparency in the law-making process and contained articles that discriminate against minorities. Widodo had instructed Law and Human Rights Minister Yasonna Laoly to get input from various communities while lawmakers discussed the articles. (AP)