Jakarta's Christian governor was sentenced to two years in jail for blasphemy against Islam on Tuesday, a harsher than expected ruling that is being seen as a blow to religious tolerance in Indonesia, the world's largest Muslim-majority nation.
The guilty verdict comes amid concern about the growing influence of Islamist groups, who organised mass demonstrations during a tumultuous election campaign that ended with Basuki Tjahaja Purnama losing his bid for another term as governor.
President Joko Widodo was an ally of Purnama, an ethnic-Chinese Christian who is popularly known as "Ahok", and the verdict will be a setback for a government that has sought to quell radical groups and soothe investors' concerns that the country's secular values were at risk.
As thousands of supporters and opponents waited outside, the head judge of the Jakarta court, Dwiarso Budi Santiarto, said Purnama was "found to have legitimately and convincingly conducted a criminal act of blasphemy, and because of that we have imposed two years of imprisonment".
Purnama told the court he would appeal the ruling. The governor was taken to an East Jakarta prison after the verdict and his lawyer Tommy Sihotang said he would remain there despite his appeal process unless a higher court suspended it.
Shocked and angry supporters, some weeping openly, gathered outside the prison, vowing not to leave the area until he was released, while others vented their shock on social media.
Home affairs minister Tjahjo Kumolo said Purnama's deputy would take over in the interim.
Thousands of police were deployed in the capital in case clashes broke out, but there was no immediate sign of any violence after the court's verdict.
Prosecutors had called for a suspended one-year jail sentence on charges of hate speech. The maximum sentence is four years in prison for hate speech and five years for blasphemy.