JAKARTA (Reuters) - Two men detained by Indonesian police for rioting this week were part of a group that had pledged support to the Islamic State militant group and intended to carry out jihad, or holy war, police said on Thursday.

Two nights of rioting and clashes between protesters and police in the capital, Jakarta, followed the release of official election results which showed President Joko Widodo defeated his rival, Prabowo Subianto, in last month’s presidential race.

“They intended to carry out jihad during May 21 and 22 protests,” national police spokesman Muhammad Iqbal, said of the two, adding they belonged to a group called Garis, which had pledged support for Islamic State.