Members of the Syria-based jihadist group Jabhat Fatah al-Sham hold a sign that reads "Punish Ahok or our bullets will".
Jihadists are urging violence at a massive rally planned in Jakarta on Friday by Islamic hardliners calling for the city's Chinese Christian governor Basuki Tjahaja Purnama, widely known as Ahok, to be jailed for insulting the Koran.
Former terrorist Nasir Abas, now a consultant to Indonesian police, showed a forum a photo of armed members of the Syrian-based jihadist group Jabhat Fatah al-Sham holding a sign that said: "Punish Ahok or our bullets will."
Mr Abas, once one of the most wanted jihadists in South-east Asia, warned there was a risk that both supporters of Islamic State and al-Qaeda's regional affiliate, Jemaah Islamiyah, would attend the November 4 demonstration.
"In Syria, those two groups are rivals," he said. "But in Indonesia they can be united because there is a common enemy. In their view, it is Ahok."
Authorities are bracing for the demonstration to turn ugly, with about 20,000 police and military personnel recruited from all over the country to provide security.
National police spokesman Agus Rianto told Fairfax Media that Indonesia's paramilitary police, BRIMOB, had moved to their highest security level, known as "Siaga Satu", "to make things easy for moving personnel if needed".
The Australian Department of Foreign Affairs and Trade updated its travel advice for Indonesia on Wednesday night, warning of heightened security and possible traffic congestion in central Jakarta on November 4.
A clearly spooked Indonesian President Joko Widodo is urging Muslim leaders and even his former rival in the 2014 presidential election - Prabowo Subianto - to help maintain calm and ease tensions ahead of the rally.
Terrorism expert Sidney Jones said radical groups sent an instruction through messaging service Telegram urging followers to emulate a suspected supporter of IS who wounded three police officers last month in Tangerang, on the outskirts of Jakarta.
"The instruction says something like: 'Follow the example of the brave young man in Tangerang. Take advantage of the thousands of police deployed during the protest'," Ms Jones said.
"They are being urged to follow the example and stab people."
Ahok is being investigated by police for alleged blasphemy, after he claimed voters had been deceived by his opponents who attacked him using a verse from the Koran.
Some Islamic groups had urged voters not to re-elect Ahok on the basis of verse 51 from the fifth sura or chapter of the Koran, al-Ma'ida, which some interpret as prohibiting Muslims from living under the leadership of a non-Muslim. Others say the scripture should be understood in its context - a time of war - and not interpreted literally.
Ms Jones criticised the government for allowing the situation to mushroom out of control.
"Why was there no effort to summon Ahok and/or big (Islamic) organisations such as NU (Nahdlatul Ulama) and Muhammadiyah to cool things down?" she said.
"I blame the Indonesian politicians who let the situation go this far."
She said organisations committed to jihad, including IS, were taking advantage of the protest and urging their followers to "ensure the flames of jihad are spread across the country".
The rally may have been spearheaded by the militant Islam Defenders Front (FPI) and hijacked by extremists but there are undoubtedly also political motives at play from those keen to undermine Ahok.
Senior figures from political parties supporting Anies Baswedan, another candidate in the gubernatorial election in February, are supporting the demonstration. There have also been rumours that former president Susilo Bambang Yudhoyono, whose son is also standing for governor, has been involved.
Dr Yudhoyono called a press conference on Wednesday and said it was "slander" to suggest a "certain political party" was behind the rally.
President Jokowi has spent this week scrambling to meet with Muslim leaders from NU, Muhammadiyah and the Indonesian Ulema Council (MUI).
"The three of us agreed not to encourage Muslims to participate in the protest and to stay away from the possibility of the bigger damage," said NU advisory board member Ahmad Ishomuddin, who met with the president.
"NU has told its members to stay home on November 4 and sleep."
In a bizarre photo opportunity, President Jokowi posed with Mr Prabowo on horseback - some wags called it horse diplomacy - before the former general said he agreed with the president on the need to guard against those who want to divide the country.
Fairfax Media. Photo: Supplied