JAKARTA (Reuters) - Indonesian authorities detained 22 people late on Monday after a violent mob clashed with police at an anti-communist protest in the capital Jakarta.

Police use a water cannon to disperse a crowd gathered outside the Indonesian Legal Aid Foundation during an anti-communist protest in Jakarta, Indonesia, early morning September 18, 2017 in this photo taken by Antara Foto. Picture taken September 18, 2017. Antara Foto/Muhammad Adimaja/ via REUTERS

President Joko Widodo’s government has tried to redress a bloody 1965 anti-communist purge, one of the darkest periods in the country’s history, but tensions remain over the purge in which an estimated 500,000 people were killed.

“The public cannot take the law into their own hands, they must defer to law enforcement apparatus,” Widodo said in a statement issued after the clashes.

Communism is banned in Indonesia and any sympathizers are regarded with a deep suspicion and hostility, especially by nationalists and Islamists.

Five police were injured in the clashes when a mob of around 200 gathered outside the Legal Aid Foundation in central Jakarta, which had held a seminar on the 1965 killings at the weekend.

Protesters threw rocks and water bottles and police fired water cannon and tear gas to disperse the crowd, according to media.

Activists called for authorities to safeguard such events and for the public to “look critically at history”.

“Repressive attitudes and allowing anarchists to threaten people’s rights will cripple our democracy,” the national commission for women’s rights said in a statement.

“There are victims of 1965 and the stigma associated with (communism) that deserve truth, justice, and healing.”

The anti-communist purge started in late 1965 after then-general Suharto and the military took power following an abortive communist coup. A million or more people were jailed, suspected of being communists.

Successive governments have refused to accept the estimated death toll figure and have refrained from apologizing.

The military, which is accused by activists of gross human rights violations during the 1965 purge, has bristled at any reconciliation efforts.

Military chief Gatot Nurmantyo this year ordered a Suharto-era propaganda film to be screened for soldiers across the country to mark the anniversary of the abortive coup on Sept 30, 1965, the night before the violence was unleashed.