A bid to make all sex outside marriage illegal was thrown out by an Indonesian court Thursday, as concerns grow over rising intolerance in the world’s biggest Muslim-majority country.

Five out of nine judges on the Constitutional Court in the capital Jakarta narrowly rejected the push to criminalise extramarital relations.

The unsuccessful petition would have affected unmarried heterosexuals and gay people, who cannot marry in Indonesia — several months after the arrests of a group of men accused of holding a “gay party”.

The court heard a judicial review filed by Islamic activist group the Family Love Alliance that sought to alter the criminal code.


“The appeal is rejected in its entirety,” said the Constitutional Court’s chief justice Arief Hidayat.

Under current laws, sex is only illegal in Indonesia for both homosexual and heterosexual people if it involves a minor.

However, gay sex is illegal in conservative Aceh province, which upholds sharia law. Under a local law that came into force in 2015, people can also be punished for having gay sex with up to 100 strokes of the cane.