Tens of thousands of hardline Muslims protesters marched through Jakarta on Friday to demand the arrest of the city's Christian governor.
Led by a group called the Islamic Defenders Front, they want Basuki Tjahaja Purnama to be jailed for blasphemy. Around 18,000 armed security guards were sent out across the city of 10 million, police said, as authorities feared the mass demonstration could turn violent.
Purnama is the first ethnic Chinese governor of Jakarta and is accused by the Muslim protestors of insulting the Qur'an. He dismissed a political attack by an opponent who urged opposition to Purnama by citing a verse from the Qu'ran.
"He is not Muslim but he humiliated the Qu'ran," protester Muhammad Said told Reuters.
"Don't refer to anything in the Qu'an, especially interpreting it incorrectly... I call on God to jail him."
Indonesia is the world's most populous Muslim country, where many people follow a moderate form of Islam. While hardliners have launched occasional agitation in the past, protests on such a large scale have been rare.
The atmosphere in Jakarta was tense and some companies asked employees to work from home, access to business districts was restricted and embassies urged caution.
Purnama served as deputy to President Joko Widodo when Widodo was city governor from 2012 to 2014, and has long been seen as an ally of the president.
Widodo and Vice President Jusuf Kalla called for a peaceful protest in a joint statement on Thursday, saying "everything and everyone should continue to work as normal".
Police are investigating the case against Purnama, who has apologised for the remarks. Widodo, a Muslim, has vowed not to interfere in any legal proceedings against Purnama, according to the Indonesian Clerical Council.
Critics say Widodo's government has not done enough to contain the religious and ethnic tension that is mounting ahead of a city governor election in February.
Purnama, popularly known as "Ahok", has a reputation as a tough reformer. He will compete for re-election against two Muslims – Agus Harimurti Yudhoyono, a son of former president Susilo Bambang Yudhoyono, and a former education minister, Anies Baswedan.
Ethnic Chinese make up just over one per cent of Indonesia's 250 million people, and they typically do not enter politics.
There has been opposition to the hardliners on social media and some banners draped from an overpass called for respect of diversity.
"Your religion or ethnicity doesn't matter, as long as you can do something good for everybody," said one banner.
Indonesia suffered a series of Islamist militant attacks early in the last decade. In the most serious incident, 202 people were killed in bombings of a nightclub on the island of Bali in 2002.
An attack in Jakarta early this year by supporters of Islamic State raised fears of a new wave of violent militancy.
Additional reporting by Reuters.