Indonesia is about to criminalize sex and living together outside marriage, in a move toward deeper religious piety in the world’s most populous Muslim country.

The country’s parliament agreed to a final draft of the code Wednesday, and it is ready to be adopted in the next week, four parliamentarians told Reuters.

Lawmakers said that the strict regulations are long overdue.

“The state must protect citizens from behavior that is contrary to the supreme precepts of God,” Nasir Djamil, a politician from the Prosperous Justice Party, told Reuters, noting that all of the nation’s religious leaders had been consulted.

The vast majority of Indonesia’s population is Muslim, but the country also has substantial Christian, Hindu and Buddhist minorities.

As part of the code, a person who has sex with someone who is not their spouse could spend a year behind bars, if a close family member lodges a complaint.

Same-sex couples will be heavily impacted by the law, as Indonesia does not recognize gay marriage.

Additionally, unmarried couples who “live together as a husband and wife” could spend six months in jail or be fined 10 million rupiah — or $710 — equivalent to three months’ salary for many Indonesians.

Authorities say the new laws will also apply to foreigners — but when asked if tourists could be jailed for sex outside of marriage, Taufiqulhadi said: “No problem, as long as people don’t know.”

Activists say that millions of Indonesians could be affected by the new laws.

“Across the board, this is a ratcheting up of conservatism,” said Tim Lindsey, director of the University of Melbourne’s Centre for Indonesian Law, Islam and Society. “It’s extremely regressive.”

With Post Wires