The violence that broke out on the streets of Jakarta in the wee hours of yesterday morning was a coordinated strike the rioters planned carefully, using WhatsApp chat groups, said the police yesterday.
As of last night, 257 suspects had been arrested, and among them were men from neighbouring Banten and West Java, as well as Lombok island, which is in West Nusa Tenggara province.
These men were armed with metal arrows, sickles, Molotov cocktails, as well as firecrackers, which were used in long clashes with the police, causing widespread disruptions in the Indonesian capital, including massive road diversions, the suspension of train and bus services as well as business closures.
But a key breakthrough for the police was when investigators found cash, ranging from 200,000 rupiah to 500,000 rupiah (S$19 to S$47), in white envelopes, each labelled with the names of the suspects.
"The event this morning was not a spontaneous mass event but an event by design," said police spokesman Mohammad Iqbal.
Indonesia's national police chief Tito Karnavian confirmed at a separate press conference yesterday that the suspects with the envelopes of cash had claimed they were paid to riot.
"We found the envelopes with the cash. They were financed - the public must know that those who did it have indeed been prepared to spark the riots," General Tito added.
Investigations against the rioters, including those suspected to be provocateurs of the violence on the first night, are ongoing, he said.
Yesterday marked the second night of clashes between the police and rioters at election supervisory agency Bawaslu's headquarters in Jakarta, even as similar stand-offs in other parts of the city continued with no sign of them abating.
As of press time, police in riot gear stood ready to disperse the mob that rained Molotov cocktails, rocks, firecrackers and other projectiles on them.
In West Jakarta, a separate battalion of troops continued to wait in a narrow street as the provocateurs of another riot stalled negotiations with the authorities.
Six people were reportedly killed and more than 200 sent to hospital for treatment during the riots, local media reported, quoting Jakarta Governor Anies Baswedan.
Gen Tito, however, said the police are still trying to verify the number of deaths.
Tuesday night's unrest started at about 11pm local time, a few hours after supporters of Mr Prabowo Subianto, who lost to President Joko Widodo in the April 17 presidential election, had left the rally they had organised.
A few hours later, a second group of between 300 and 400 men appeared and attacked the police with a barrage of Molotov cocktails and other homemade weapons, said the police.
By yesterday morning, the violence had spread to other areas of the capital as the rioters split up and went in different directions after encountering police officers in riot gear.
The conflict reached boiling point when the police found themselves in a stand-off with a group that had set fire to an officers' dormitory in West Jakarta.
By afternoon, police negotiators managed to de-escalate tensions, only for the violence to erupt again in the evening just after the Muslim break-fast hour.
The police have not publicly identified the mastermind behind the chaos, which began a day after the General Elections Commission (KPU) announced the results of the presidential election.
Eyewitnesses said the riot broke out at about 6.30pm local time, after a loud bang was heard in the midst of what appeared to be a peaceful protest by supporters of Mr Prabowo.
Thousands of people had turned up earlier in the streets outside the Bawaslu building to attend a rally to pressure the elections watchdog to investigate his allegations of vote-rigging after his loss.
Indonesia has been on edge for days following plans by an Islamist group to hold a two-day rally, originally at the site of the KPU building starting Monday, to protest against the results of the presidential polls.
The call for Muslims to throng the streets around the elections commission building in Jakarta had been circulating on social media over the weekend.
The rally organisers, who identified themselves as Persaudaraan Alumni 212, were calling the mass gathering a "constitutional jihad".
The name Persaudaraan Alumni 212 refers to people who took part in a rally held in the city more than two years ago on Dec 2, against former Jakarta governor Basuki Tjahaja Purnama for insulting Islam.
The 2016 protest, led by far-right Muslims from the Islamic Defenders Front, known locally as the FPI, had threatened to destabilise the country during the gubernatorial election, which was marred by religiosity and sectarianism.
Reports ahead of the rally this week raised similar fears among many in the city, prompting foreign missions like the United States Embassy to issue a warning of "heightened risk of terrorism" and mass demonstrations in Jakarta, as well as other cities in Indonesia, such as Surabaya and Medan.
A show of force by the police and military, which had barricaded the KPU building with concertina wire since Monday, caused the protesters to occupy the main thoroughfares outside the Bawaslu office instead.