Indonesia has introduced a new law that could see many Aussies and other tourists thrown into jail.

The predominately Muslim country announced that the government has approved legislation that would outlaw premarital sex.

The news has been met with outrage with many saying it is setting the country back and taking away from people’s freedoms.

This new law will also affect Bali, an extremely popular holiday destination and far more liberal than the rest of the country.

Bambang Wuryanto, the head of the parliamentary commission in charge of revising the code, told politicians that the old rule is no longer relevant.

“The old code belongs to Dutch heritage … and is no longer relevant now.”

Yasonna Laoly, the Minister of Law and Human Rights said it was time to leave the “colonial criminal code” behind.

“We have tried our best to accommodate the important issues and different opinions which were debated,” he said.

“However, it is time for us to make a historical decision on the penal code amendment and to leave the colonial criminal code we inherited behind.”

The new law is not just applied for tourists, but also citizens with acts of premarital and extramarital sex could only be reported by a spouse, parents or children.

Anyone found guilty of premarital and extramarital sex will face a year in jail.

Despite the law passing, it is clear that it won’t be applied immediately as it will take time to transition from the old code to the new one.

The new code is expected to be implemented within the next three years.

Image: Getty Images

This article first appeared on OverSixty.