Indonesia's constitution requires belief in one supreme god under the state ideology of Pancasila, formally recognizing six religions, Islam, Protestantism, Catholicism, Hinduism, Buddhism and Confucianism, a framework that leaves indigenous animist and folk traditions in an uncertain legal position, though a 2017 Constitutional Court ruling required the state to recognize adherents of indigenous faiths on identity documents. Aceh province holds special autonomy to implement its own version of sharia law, including public caning for offenses such as gambling, alcohol consumption and extramarital relations, an arrangement negotiated as part of the 2005 peace settlement ending a long separatist conflict.
Religious minorities, including Ahmadi Muslims, considered heretical by many mainstream Sunni authorities, and Shia Muslims, have faced episodes of mob violence and forced closure of houses of worship, and Christian communities in the Moluccas and Sulawesi experienced severe sectarian conflict in the late 1990s and early 2000s that killed thousands before a fragile peace took hold. Blasphemy laws, used more frequently in the twenty-first century than in earlier decades, have been applied against religious minorities and, in a widely covered 2017 case, against Jakarta's Christian governor Basuki Tjahaja Purnama, whose conviction and imprisonment for blasphemy drew significant domestic and international attention.