On Tuesday, Indonesia's parliament approved a new criminal code banning sex outside of marriage, which carries a punishment of up to one year in jail.

The new code, passed with support from all political parties, also prohibits cohabitation between unmarried couples.

The code will apply to Indonesians and foreigners and comes despite concerns the laws could keep tourists away and harm investment.

It will not go into effect for three years to allow for the drafting of regulations.

INDONESIAN VOLCANO ERUPTS, RELEASING RIVER OF LAVA

Criminal code approved in Indonesia

Yasonna Laoly, Indonesian Minister of Law and Human Rights, receives the new criminal code report from Bambang Wuryanto, head of the parliamentary commission overseeing the revision, during a parliamentary plenary meeting in Jakarta, Indonesia. (Reuters Photos)

The country already bans adultery but had not done the same for premarital sex.

Maulana Yusran, deputy chief of Indonesia's tourism industry board, said the new code was "totally counter-productive" during a time when the country's economy and tourism were beginning to recover from the coronavirus pandemic.

"We deeply regret the government have closed their eyes. We have already expressed our concern to the ministry of tourism about how harmful this law is," he said.

U.S. Ambassador to Indonesia Sung Kim said at an investment summit that the new code could lead to less foreign investment, tourism and travel to the country.

Criminal code approved banning sex outside of marriage

Bambang Wuryanto, head of the parliamentary commission overseeing the revision, passes the report of the new criminal code to Sufmi Dasco Ahmad, Deputy speaker of the House of Representatives, during a parliamentary plenary meeting in Jakarta, Indonesia. (Reuters Photos)

NORTH KOREA EXECUTES TEENAGERS FOR DISTRIBUTING SOUTH KOREAN TV, MOVIES: REPORT

"Criminalising the personal decisions of individuals would loom large within the decision matrix of many companies determining whether to invest in Indonesia," Kim said.

The code is part of several new laws that critics say impose on civil liberties, along with bans on black magic, insulting the president or state institutions, spreading views counter to state ideology and staging protests without notification.

Criminal code passed

Bambang Wuryanto, head of the parliamentary commission overseeing the revision of Indonesia's criminal code, speaks during a parliamentary plenary meeting in Jakarta, Indonesia. (Reuters Photos)

CLICK TO GET THE FOX NEWS APP

Indonesia's Law and Human Rights Minister Yasonna Laoly responded to criticism of the new law by telling parliament, "It's not easy for a multicultural and multi-ethnic country to make a criminal code that can accommodate all interests."

Reuters contributed to this report.