Indonesia is poised to pass a new penal code that criminalizes sex outside marriage and introduces stiff penalties for insulting the president's dignity.

Indonesia is the world's most populous Muslim-majority country and has substantial Christian, Hindu and Buddhist minorities but has seen a recent trend toward deeper religious piety and conservative Islamic activism.

After parliament and the government agreed on a final draft on Wednesday, four parliamentarians said the new criminal code will be adopted in the next week.