Indonesia's new criminal code has grabbed headlines for making sex outside marriage illegal but Islamic parties wanted even harsher punishment for moral crimes in the world's largest Muslim-majority nation, accounts of behind-the-scenes negotiations reveal.
The so-called morality code is just one part of the legislative overhaul that the Indonesian parliament ratified this month, a 226-page set of new laws that critics say threaten civil liberties, but officials defend as reflective of Indonesia's identity.
Behind the scenes, secular nationalist parties holding a majority in parliament opposed the tighter laws on morality but risked being branded supportive of adultery if they remained unyielding in their opposition.
What resulted was a compromise between political parties and the government, said Taufik Basari, a member of the parliamentary commission overseeing the changes.
"We found a middle ground, not only between nationalists and religious parties but also between progressive liberals and conservatives," he said.
The world's third-largest democracy has a tradition of pluralism and moderate Islam, although more conservative interpretations of Islam have gained ground since the fall of authoritarian leader Suharto in 1998.
The new criminal code, decades in the making and created to replace a colonial-era set of laws, includes articles that ban insulting the president and state institutions, and spreading views counter to the state ideology, known as Pancasila.
The United Nations has warned the laws threaten media freedom, privacy and human rights.
'BEST WE COULD DO'
The morality laws have, not surprisingly, drawn the most attention and criticism but some officials said they would have been even stricter if the religious parties had their way.
Islamic parties had called for a maximum jail term of seven years for sex outside marriage, and for anyone to be able to report a suspected offence, said sources familiar with the discussions.
With negotiations deadlocked until late November, the religious parties called for a parliamentary vote, something the nationalist parties were reluctant to see as it would have meant every party having to reveal its stand in parliament, and potentially to the public, said Muhammad Nasir Djamil of the Islamic Solidarity Party.
"This issue is very sensitive among religious people," he said.
In forming the laws, a team of legal professors had turned to Indonesia's official dictionary, which defines adultery as any sex outside marriage, not just extramarital sex.
That definition is now law.
Other articles criminalise cohabitation between unmarried couples, promoting contraception to minors, and abortion, apart from cases linked to rape or a medical emergency.
"Indonesia was trying to make its own code, based on its values," said University of Indonesia law professor Harkristuti Harkrisnowo, part of the drafting team.
'DEFUSE ATTACKS'
None of the nationalist parties, which dominate the ruling coalition, favoured the morality clauses but eventually agreed to the watered-down version, said President Joko Widodo's deputy chief of staff, Jaleswari Pramodhawardani.
The compromise reached in the final version carries a maximum one-year sentence for sex outside marriage and six months for cohabitation. Suspected offences can only be reported by a spouse, parent or child, which officials hope will prevent police raids and finger-pointing by moral crusaders.
"This was the best we could do ... It was a win-win solution, a middle ground," said Taufik. "The article is still there, but we included some tight limitations."
The new laws come into effect in three years and the largely muted public response indicates they are unlikely to threaten political stability.
Jokowi, as the president is known, is constitutionally barred from running again in the 2024 election but ahead of the polls, support for the morality laws carries a political advantage, analysts said.
"Nationalist parties were thinking ahead to the 2024 election," said Greg Fealy of the Australian National University.
"They want to defuse potential Islamist attacks upon them."
If the Islamic parties largely got what they wanted on sex, the government and its allies got some of what they wanted too, parliamentary and government sources said.
A contentious article that outlaws insulting the dignity of the president was reintroduced by the government, said law professor Harkristuti, despite a similar law being annulled by the constitutional court for being undemocratic.
That offence, which sources said was not supported by Jokowi himself, can only be reported by the president.
The government was also able to include a last-minute adjustment in its favour to a law banning the spread of values counter to the state ideology, without public consultation, said two sources involved.
Andreas Harsono of Human Rights Watch said both sides got what they wanted at a cost to rights.
"The Islamic parties benefit from the morality agenda ... while the other parties will benefit from strengthening of authoritarianism," he said.
(Reporting by Kate Lamb in Sydney and Ananda Teresia in Jakarta; Editing by Ed Davies)