At least six people were killed as Indonesia's capital erupted in violence on Wednesday when police clashed with protesters opposed to the re-election of President Joko Widodo.
Dozens were arrested and parts of Jakarta were littered with debris and burned-out cars, as the violence triggered security advisories from the US and Australian embassies.
Authorities also restricted access to some social media in a bid to stop rumours and fake news from spreading online.
National police chief Tito Karnavian said six people had died, but denied authorities had fired live rounds on the crowd, and called for calm.
"Some had gunshot wounds, some had blunt force wounds but we still need to clarify this," he told reporters.
The violence came after Indonesia's election commission on Tuesday confirmed Widodo had beaten retired military general Prabowo Subianto for the presidency in a poll held on April 17.
Subianto has said he would challenge the results in court - as he did, unsuccessfully, against Widodo in 2014 - but also warned his claims of widespread cheating could spark street protests.
That was borne out early on Wednesday as protesters set market stalls and cars on fire while hurling fireworks and rocks at security personnel clad in riot gear and holding shields, an AFP reporter on the scene said.
The early morning clashes started after several thousand Subianto supporters rallied peacefully near the election supervisory agency's office in the heart of the capital on Tuesday.
Later, roads were blocked off in parts of the sprawling metropolis - with some shopping malls, businesses and schools also closed as small groups of protesters engaged in skirmishes with police.
"I open myself to anyone to work together to build and develop this nation, but I won't tolerate anyone who tries to disrupt public security, the democratic process or the unity of our... country," Widodo said at a press briefing, flanked by his chief security ministry and the head of the military
Subianto repeated calls for supporters to avoid violence.
"We support people's constitutional rights (to protest) as long as they are civilised, peaceful and non-violent," he told reporters.
By Wednesday afternoon, a crowd of several thousand demonstrators flowed into the city's business and commercial heart for a rally.
"Avoid areas where demonstrations are occurring & exercise caution in the vicinity of any large gathering," the US embassy said.
More than 30 000 troops had been deployed in anticipation of unrest, and the elections commission office was barricaded with razor wire and protected by scores of security personnel.
In Medan city on Sumatra island, hundreds took part in a peaceful rally over election cheating claims on Wednesday.
But the violence in Jakarta was a planned act by paid "provocateurs", authorities claimed, citing envelopes with money found on some of nearly 70 demonstrators who had been arrested.
Election officials and analysts have discounted Subianto's claims, but many supporters appeared convinced of rampant cheating in the world's third-biggest democracy.
"I need to support Indonesia's sovereignty - there has been massive fraud in this election," said Puji Astuti, a 42-year-old Subianto supporter at a rally in central Jakarta on Wednesday.
The protests in support of Subianto have sparked a backlash online from opponents with the hashtag #Tangkapprabowo (#ArrestPrabowo) trending widely on social media.
Tensions have also spiked since police said last week that they had arrested dozens of Islamic State-linked terror suspects who had planned to cause chaos by bombing protests.