Hundreds of people were detained and some deaths have been reported in violent protests that broke out in Indonesia's capital Wednesday following the announcement of the final results of last month's presidential election.

In the early evening, there was a resumption of rock throwing by hundreds of rioters gathered around Bawaslu, Indonesia's election monitoring body, where protesters have been gathered since Tuesday morning.

[Getty/Kyodo]

Police said a total of 257 protesters had been detained, including 166 in West Jakarta where mobs carrying Molotov cocktails, rocks and firecrackers set fire to a police dormitory and dozens of cars.

Unsuccessful presidential candidate Prabowo Subianto and Jakarta Gov. Anies Baswedan, his staunch supporter, claimed that at least six people were killed in violence early Wednesday, with authorities trying to confirm the facts.

"Please stop! Please help us. We are not going to fire tear gas, but please stop throwing stones at us!" Central Jakarta Police Chief Harry Kurniawan told the mobs there, while at the same time asking security personnel to restrain themselves.

The police had earlier in the day used tear gas to try to disperse the protesters, composed mainly of supporters of Prabowo.

The election commission on Tuesday declared incumbent President Joko "Jokowi" Widodo the winner of the April 17 election, defeating Prabowo by a double-digit margin.

(Indonesian President Joko "Jokowi" Widodo)
[Photo courtesy of the Indonesian Presidential Palace]

"The violence early this morning was not spontaneous," National Police spokesman Muhammad Iqbal told a press conference, while suggesting some protestors were paid to foment unrest.

Police said they found an ambulance filled with rocks and envelopes containing cash. A photo that went viral on social media shows such a vehicle bearing the logo of Prabowo's Gerindra Party.

Also Wednesday, Communication and Information Technology Minister Rudiantara announced that social media would be partially restricted to prevent the spread of hoaxes and provocations regarding the protests.

Responding to the violence, Jokowi told a press conference that he is "open to anybody to work together to build this country, to advance this country," but warned he "will not tolerate anyone, especially rioters, trying to undermine the security and the process of democracy, the unity of this country that we very much love."

"I will not give a space to the rioters...The military and police will firmly act in accordance to the prevailing law," he added.

[Anadolu Agency/Getty/Kyodo]

In a press conference Wednesday, Prabowo called on the security forces to stand with the people and not "be a vehicle to the powerful."

"The uniforms you wear, the food you eat and the weapons you bear are all paid by the people. You are all the people's," the 67-year-old former army general said.

Prabowo was speaking a day after he declared he does not accept the official vote count, alleging electoral fraud, and vowed to challenge the final vote tally before either the Constitutional Court or Bawaslu.

Security has been tightened in the capital since Monday, with soldiers and police officers seen on the streets and at many buildings. About 36,000 of them have been deployed across Jakarta, particularly around Bawaslu and the election commission.

Police fear that Islamic State-affiliated militants could use rallies or mass gatherings to attack crowds containing protesters, journalists and security personnel.

So far this month, 29 militants have been arrested on suspicion of planning such attacks, targeting demonstrations around the announcement of the election results.

(Rudy Madanir and Sepsha Dewi Restiananingsih contributed to this article)