Early Saturday, President Joko Widodo decried the violence and accused “political actors” of “exploiting the situation,” according to Reuters. He later cancelled a visit to Australia that had been scheduled to begin Sunday.

Mr. Basuki, 50, the grandson of a tin miner from Guangzhou, China, has been a popular figure in Jakarta. Like Mr. Joko, who preceded him as governor before becoming president, he is very different from the soft-spoken Javanese politicians the capital is used to.

Brash and blunt-speaking, Mr. Basuki is known for publicly berating civil servants as incompetent and corrupt. Opinion polls indicate that he holds a large lead over his two opponents in the election for governor on Feb. 15.

If he wins, he would be the first ethnic Chinese Christian directly elected to the office, the most powerful provincial post in the country and one that Mr. Joko used as a springboard to the presidency. Mr. Basuki, who had been Mr. Joko’s vice governor, inherited the city’s top job when Mr. Joko became president in 2014.

Indonesians practice a pluralistic brand of Islam, though pockets of the country are rigidly conservative and there are periodic outbreaks of violent radicalism. Political opponents have used Mr. Basuki’s religion and his ethnicity against him, but polling indicates that most Jakarta voters do not consider them campaign issues.

Analysts said that Friday’s march and other recent protests against Mr. Basuki were, nevertheless, attempts to weaken him ahead of the election. Analysts have also said that some of the Islamic groups that organized the march have ties to the campaigns of Mr. Basuki’s two opponents, though the groups and the campaigns have denied that. His opponents are Anies Baswedan, a former minister of higher education, and Agus Harimurti Yudhoyono, a former Army officer and the son of Susilo Bambang Yudhoyono, who was president from 2004 to 2014.

“Precisely because religion and ethnicity are as such not electoral factors, Ahok’s opponents have to up the game,” said Marcus Mietzner, an associate professor at the Australian National University in Canberra, who closely follows Indonesian politics. “Instead of claiming that Ahok shouldn’t be governor because he’s a Christian — which hasn’t worked — they try to portray him as a blasphemist who violated the law.”