Indonesia on Friday began enforcing its newly ratified penal code, known as the KUHP, replacing a Dutch-era criminal law that had governed the country for more than 80 years and marking a major shift in its legal landscape.

The 345-page Indonesian Penal Code, passed in 2022, comes into force after a three-year transition period. Since declaring independence in 1945, Indonesia had continued to operate under the colonial-era framework, which critics said had become outdated and misaligned with the country’s social values.

The KUHP was finalized after years of debate over how to balance human rights, religious norms and local traditions. A previously revised code had been poised for passage in 2019, but then-President Joko Widodo urged lawmakers to delay a vote as public criticism mounted and protests involving tens of thousands of people broke out across the country.

Opponents said the draft contained articles that discriminated against minorities and that the legislative process lacked transparency. A parliamentary task force finalized the bill in November 2022, and lawmakers unanimously approved it a month later, with the government calling it a “historic step.”

Coordinating Minister for Law, Human Rights, Immigration, and Corrections Yusril Ihza Mahendra said the enforcement marked “the end of the colonial criminal law era and the beginning of a more humane, modern, and just legal system rooted in Indonesian culture,” adding in a Friday statement that “This is a historic moment for the Indonesian nation.” He also said the old code based on Dutch law is “no longer relevant to the dynamics of modern Indonesian society.”

Among provisions under scrutiny, the KUHP criminalizes sex outside marriage and sets penalties of up to one year in prison. It also criminalizes cohabitation, with a six-month sentence, while allowing adultery cases to proceed only after a complaint by a spouse, parents or children—an approach the government says is designed to prevent arbitrary enforcement, including against tourists.

Rights groups have said the morality-based rules could fuel privacy invasions and selective punishment. Human Rights Watch warned that such provisions could lead to invasions of privacy and selective enforcement, while Amnesty International Indonesia executive director Usman Hamid described the KUHP as “a significant blow” to civil liberties and said it would “entrench obstacles to freedom of speech while criminalizing legitimate and peaceful dissent,” warning it could open the door to abuse of power.

The code also expands an existing blasphemy law, keeping prison sentences of up to five years for deviations from the core teachings of Indonesia’s six officially recognized religions. It preserves penalties of up to 10 years for associating with Marxist-Leninist organizations and four years for spreading communist ideology.

Officials and legal reform groups also pointed to changes in sentencing. Deputy Minister of Law Edward Hiariej said the government issued strict guidelines distinguishing criticism from criminal insult, and said public opinion still often favors harsh penalties rooted in outdated notions of retribution, adding: “This is a legacy of the law of retaliation,” contrasting it with modern systems that emphasize harm repair and reintegration.

The Institute for Criminal Justice Reform said the KUHP expands non-custodial sentences, including community service and supervision, and gives judges greater discretion to tailor penalties to cases. Erasmus Napitupulu, ICJR’s executive director, said the code’s 10-year probationary mechanism for death row inmates is “an initial step toward eventually abolishing the death penalty in Indonesia” and called it meaningful progress for criminal justice reform.

Some advocates welcomed what they described as limits on the scope of the law, including the government’s decision to drop a proposed article that would have criminalized gay sex after opposition from civil society groups. While the KUHP retains the death penalty and a ban on abortion, it introduces a 10-year probationary period after which death sentences may be commuted to life imprisonment or 20 years for people who demonstrate good behavior, and it formalizes exceptions to the abortion ban for life-threatening medical conditions and for pregnancies resulting from rape if the fetus is less than 12 weeks old.