Under proposed law, people who have premarital or extramarital sex could face between six months and one year in jail.

Joko Widodo, the president of Indonesia, has ordered a delay in a parliamentary vote on a new penal code criminalising gay and premarital sex following a public outcry.

Widodo said on Friday that he made the decision after considering public opinion.

He said the bill should not be voted on by members of the current House of Representatives, whose terms end in early October, and deliberations should be conducted by the new legislators.

“After hearing from various groups with objections to aspects of the law, I’ve decided that some of it needs further deliberation,” the recently re-elected president said in a televised press briefing.

“The justice minister has been told to convey my views to parliament and that ratification of the criminal code should be postponed and not passed” in the current session, he said, adding that 14 articles needed further review.

The vote had been due next week with the revisions also including penalties for insulting the president’s dignity and a four-year jail term for abortions in the absence of a medical emergency or rape.

The planned revisions had spurred neighbour Australia to update its travel advice, warning citizens of risks they faced from sex outside marriage or same-sex relations in Indonesia if the new rules take effect.

Widodo said he has ordered his justice minister “to perfect” the bill before it is deliberated on by the next parliament.

The Institute for Criminal Justice Reform, a non-government organisation, welcomed the delay and urged the government to set up an expert panel to ensure a new draft is “in line with the principles of constitutional democracy” and has wide public support.

Wave of criticism

Andreas Harsono, a senior Indonesia researcher at Human Rights Watch, said: “Indonesia’s draft criminal code is disastrous not only for women and religious and gender minorities, but for all Indonesians.

“Lawmakers should remove all the abusive articles before passing the law.”

Updating Indonesia’s criminal code – which stretches back to the Dutch colonial era – has been debated for decades and appeared set to pass in 2018 before it fizzled.

A parliamentary task force finalised the 628-article bill on September 15.

The renewed push, backed by conservative Islamic groups, was met with a tidal wave of criticism from rights groups and ordinary citizens.

An online petition calling for the bill to be scrapped garnered half a million signatures while hundreds of thousands took to social media to vent their frustration.

“It’s crazy if this bill is passed, crazy! What is this country turning into?” movie director Joko Anwar tweeted to his 1.7 million followers.

Under the proposed law, people who have premarital or extramarital sex could face between six months and one year in jail, as well as fines.

There were also penalties for anyone “showing or offering” contraception to minors under 18.

The revisions appeared to bar parents from teaching their children about sex or contraception in favour of authorised government workers.

“Sex education is important. Period,” one woman wrote on Twitter.

“I’d rather go to jail than see my daughter raped by her boyfriend just because she doesn’t know that sex has to be consensual.”

The sweeping proposals also called for a wider interpretation of Indonesia’s blasphemy law, which has seen members of religious minority groups, including Christians and Buddhists, prosecuted in the past.