Two back-to-back decisions have left Indonesia more religiously polarised than ever. One was politically inept, the second deeply unjust. Both may come back to haunt the Jokowi government.

The first was the announcement on 8 May that the government would ban Hizbut Tahrir, an international organisation that promotes an Islamic caliphate (but not the ISIS version) and full implementation of Islamic law. It helped turn thousands of people out on the streets in late 2016 and early 2017 to demand the prosecution and imprisonment of Jakarta governor, Basuki Tjahaja Purnama, better known as Ahok. The second was the court verdict on 9 May sentencing Ahok to two years in prison for blasphemy.

In the first case the government moved against a hardline organisation, but did it so clumsily that Hizbut Tahrir may yet turn it into a legal and public relations victory. In the second, a panel of judges ignored evidence and the prosecution's own case to put one of the country's best-known politicians behind bars for telling a group of civil servants to vote their conscience and ignore political arguments that non-Muslims should not be allowed to govern Muslims.

It isn't the first time Indonesians judges showed no concern for evidence in a high-profile case, but it could be one of the most damaging: it instantly sent a signal that non-Muslims are lesser citizens, and candles in support of Ahok were lit as far away as Atambua, West Timor. It also underscored the rot at the core of the Indonesian legal system, the lack of progress that has been made in judicial reform, and the weakness of constitutional guarantees of equality under the law.

The strength of mob rule stands in sharp contrast to the weakness of the government's move against Hizbut Tahrir – ostensibly in support of pluralism and Pancasila, the state ideology that stresses belief not in one religion but in one God.

Police had been warning for weeks that HTI, as the Indonesian branch is known, would be banned. An international membership-based organisation with a secretive leadership, it aims at recruiting the educated middle class and infiltrating centres of power until it has a critical mass to support the overthrow of non-Islamic governments and establish a caliphate. Intolerant, highly disciplined but non-violent, it is loathed by moderate members of the two largest Muslim social organisations in Indonesia, Nahdlatul Ulama and Muhammadiyah, which have seen it take over many of their schools and mosques. Both organisations support a ban.

While HTI rejects al-Baghdadi’s ISIS, its support of a caliphate has led some members to leave HTI for ISIS – most notably Bahrun Naim, a Syria-based ISIS leader from Solo who has been encouraging attacks on police, Shi’a, foreigners and government officials, and who was behind the failed attempt last December to recruit a female suicide bomber to attack the presidential palace. Other former HTI members include Mohammed Fachry, who organised many of the ceremonies across Indonesia in 2014 pledging loyalty to al-Baghdadi, and Gigih Rahmat, the leader of a pro-ISIS cell in Batam.

The government could thus have made a plausible case against HTI. The problem is that HTI is a legal association, registered with the Ministry of Law and Human Rights, and there are specific procedures under the Mass Organisations Law for dissolving a body that tries to undermine the state or spreads hatred. Those steps begin with written warnings, and the government could have used these warnings to explain why it considered HTI’s ideology so dangerous.

Instead, it had General (Ret.) Wiranto, a tired, old New Order-era holdover who is President Jokowi’s Coordinating Minister for Political, Legal and Security Affairs, make a tired, old New Order-like argument for banning an organisation that undermined Pancasila. He offered no specifics, suggesting only that legal procedures would be followed, meaning the ban is not yet in effect. He mumbled about HTI being an 'embryo', but never made clear for what. Human rights organisations predictably condemned the move as a violation of freedom of association, which it is in the absence of a well-argued case on national security grounds.

This gives HTI plenty of time and ammunition to prepare a legal rebuttal, and it could well win in court, especially if the case comes before a panel of conservative judges of the calibre that tried Ahok. This could ultimately strengthen HTI's influence.

Ironically, one of those most delighted with the HTI decision was Bahrun Naim. Writing in a blog post from Syria on 9 May, he said he had long criticised his former colleagues for failing to understand who the real enemy was and taking too flexible a position against apostate officials. Now he said, he hoped HTI would follow the example of Hizbut Tahrir in Uzbekistan, a group which eventually abandoned its do-nothing stance and took up jihad against the government.

The ban on HTI and court cases underway against other hardliners look increasingly ineffectual. In a legal system where truth is not a defence, corruption is rampant and evidence doesn’t matter, every case is a gamble. It’s in the political arena where pluralism has to triumph.