LAST month, just days before Idul Fitri, marking the end of the holy month of Ramadan, worshippers at the An-Nur mosque in southern Jakarta, Indonesia’s capital, had a problem: a mob was blocking them from entering. The worshippers were members of a 400,000-strong Ahmadiyya community in Indonesia—followers of a peaceable school of Islam holding that a 19th-century Indian, Mirza Ghulam Ahmad, was a prophet and messiah. Ahmadi Muslims believe in the separation of religion and the state, and they forswear jihad. Many other Muslims consider them to be heretics or non-Muslims.

Across Indonesia, where Sunni Muslims are in the majority, Ahmadis have been threatened and attacked, and their mosques forcibly closed. In 2011 a 1,500-strong mob attacked an Ahmadi mosque in western Java and fell upon worshippers with machetes and sticks, killing three. Attacks, blockades and bureaucratic opposition remain common: An-Nur was told to shut after a local official said it lacked the required permits to operate as a mosque.

Jakarta’s governor, Basuki Tjahaja Purnama, an ethnic-Chinese Christian better known as Ahok, promised to help it reopen. It was a rare show of courage from an Indonesian politician.

Indonesia is not the only place where Ahmadis face violence. In Pakistan a gruesome assault by the Pakistani Taliban in 2010 left 95 Ahmadis dead at a mosque in Lahore. The Islamic republic’s constitution declares Ahmadis not to be Muslims. Pakistanis applying for a passport must sign a declaration affirming that Ghulam Ahmad was an “impostor”.

But Indonesia is not an Islamic republic, and its constitution is less doctrinaire. Though it forbids atheism—Pancasila, Indonesia’s ruling ideology, mandates a belief in one God—it enshrines the right of Indonesians “to worship according to their own religion or belief”. Indonesia recognises six official religions: Islam, Catholicism, Protestantism, Buddhism, Hinduism and Confucianism. By law followers of those six faiths ought to be free to worship as they choose.

In 2006, however, the government of the then-president, Susilo Bambang Yudhoyono, issued a decree requiring any believers wanting to build a house of worship to obtain the approval of the local religious-affairs office, as well as the signatures of 90 members of their faith and 60 other community members. Two years later it forbade Ahmadis from proselytising; violating this decree remains punishable by five years in prison for blasphemy. In the wake of these national decrees, local governments have passed similar ordinances. They have been enforced not just against Ahmadis, but also against Shia and Bahai believers.

And Christians in Bogor and Bekasi, on the edge of Jakarta’s urban sprawl, also face harassment. Local governments have blocked construction of their churches, despite Indonesia’s Supreme Court ruling that they may be built. These Christians have been holding services across from the presidential palace in Jakarta to draw attention to their difficulties at home. (Majoritarian regulations can on occasion cut both ways: in majority-Christian Papua last month, Muslims defied a letter demanding that they not hold prayers on their religious holiday; the ensuing clash left one dead and a mosque razed.)

Plenty of Indonesians say they should not have to wait for more enlightened local politicians like Ahok: a push for more religious freedom should come from the top. Many hoped that President Joko Widodo, or Jokowi, who entered office last October, would expand protection of religious minorities. At Indonesia’s largest Muslim organisation, Nahdlatul Ulama, he called this week for “moderate, tolerant, peaceful and progressive Islam”. But Jokowi has said nothing in support of personal religious freedom. Nor has he annulled the decrees by the government of Mr Yudhoyono, his predecessor.