Demonstrations over the outcome of last month's presidential election gripped the heart of Indonesia's capital on Wednesday after an overnight face-off between police and protesters in which Jakarta's governor said six people were killed.
The riots followed an announcement on Tuesday by the General Election Commission (KPU) confirming that President Joko Widodo had beaten his challenger, former general Prabowo Subianto, in the April 17 poll.
Crowds swelled in central Jakarta on Wednesday and police said they expected more protesters to join them before nightfall. Some of those arriving carried wooden poles and some had smeared toothpaste around their eyes, a practice commonly carried out to eliminate the effects of tear gas.
Protests that began calmly in the sprawling textile market neighbourhood of Tanah Abang on Tuesday turned violent after nightfall, with police firing tear gas to disperse the crowd.
Jakarta Governor Anies Baswedan told TVOne that by the morning six people had been killed and 200 wounded.
Television footage showed smoke billowing from behind dozens of protesters in the streets of Tanah Abang on Wednesday, with some throwing firecrackers and tearing down public fences.
President Widodo said security was now under control and warned of tough action against those instigating riots.
"I will not tolerate anyone disrupting the security...or unity of the country, or those who disrupt the democratic process," he told a briefing at the palace.
Police have arrested up to 100 people on suspicion of provoking riots.
Widodo's challenger, Prabowo, who has refused to concede defeat, called for peaceful protests and crowd control.
"I urge all sides, the people who are expressing their aspirations, the police, the military and all sides to refrain from physical abuse," he told a briefing.
The majority of protesters appeared to have come from outside Jakarta and police found envelopes containing money on some of the people they searched, national police spokesman Muhamad Iqbal told a news conference.
"This is not a spontaneous incident, this is something by design. There are indications that the mobs are paid and bent on causing chaos," he said.
We know who is behind this
The KPU on Tuesday confirmed unofficial counts by private pollsters that gave Widodo a 55.5% share of votes against 44.5% for Prabowo.
Widodo won more than 85 million votes of 154 million cast in the world's third-largest democracy, but retired general Prabowo has alleged "massive cheating and irregularities".
A Prabowo campaign official said they plan to contest the result in the Constitutional Court on Thursday. Prabowo also launched a legal challenge after he was defeated in the 2014 election by Widodo, which was unsuccessful.
The election supervisory agency dismissed claims of systematic cheating, citing a lack of evidence. Independent observers have said the poll was free and fair.
Analysts have said Widodo's double-digit margin of victory means the opposition does not have a strong case to claim rigging, but Islamist supporters of Prabowo could cause considerable disruption.
Islamist groups, many of which support Prabowo, have in the past been able to mobilise mass support.
From late 2016, they organised a series of protests against then-Jakarta governor Basuki Tjahaja Purnama, the first ethnic-Chinese Christian to hold the job, who was subsequently jailed for insulting the Koran.
Presidential Chief of Staff Moeldoko said he believed there was "a systematic effort by a certain group ... that is riding on the situation to muddy the situation".
"We know who is behind this," he said.
Of the six reported fatalities, a 30-year-old man was killed due to a blunt force trauma, said Dr. Sumariyono at the Cipto Mangunkusumo hospital in Jakarta. Another man died of bullet wounds, news website Tirto.com reported, quoting a doctor at another hospital.
National police chief Tito Karnavian said reports of the deaths were being investigated. Police spokesman Dedi Prasetyo said security forces, including military personnel, were not armed with live bullets.
Chief security minister Wiranto said the government would temporarily block certain social media functions to prevent inflammatory hoaxes and fake news.
Fadli Zon, deputy chairman of Gerindra, Prabowo's political party, accused police of initiating an attack on protesters and said he found 171 bullets, including live rounds, when he visited the area on Wednesday morning.
"The public have a right to demonstrate. They are people who are concerned by cheating. They are not mobilised, paid or facilitated," Zon said.
Indonesian authorities say 40,000 police and army personnel are on duty across Jakarta to maintain security.
Many office buildings, businesses and embassies in downtown Jakarta were closed, as were train stations in the area.
Australia, the United States, and Britain issued travel alerts warning of an increased risk of violence across Indonesia and advising citizens to stay away from protests.