The outgoing governor of Jakarta has been sentenced to two years in prison for blasphemy and inciting violence.
Basuki Tjahaja Purnama, known as Ahok, was the first ethnic Chinese Christian to run Indonesia’s capital, and the case was seen as a test of the country’s religious tolerance.
He was accused of insulting Islam by referring to a verse in the Koran during a campaign speech.
Mr Purnama denied blasphemy and in court said he would mount an appeal.
The sentence is harsher than most observers had expected – prosecutors had called for a suspended one-year sentence.
The governor was “found to have legitimately and convincingly conducted a criminal act of blasphemy, and because of that we have imposed two years of imprisonment,” the judge told the court.
Mr Purnama was accused of blasphemy for comments he made during a pre-election speech last September.
He implied that Islamic leaders were trying to trick voters by using a verse in the Koran to argue that Muslims should not vote for a non-Muslim leader.
His remarks, which were widely shared in an edited video, sparked outrage among religious hardliners.
They staged regular large rallies calling for him to face trial.
Throughout the trial, Mr Purnama denied wrongdoing, but did apologise for his comments nonetheless.
Ahead of the verdict, protesters for and against Mr Purnama had gathered outside the court demanding respectively his acquittal or a long prison sentence.
Disappointed with the eventual verdict, some protesters demanded the outgoing governor to be hanged.
Around 15,000 security personnel from the police and military are providing security at the scene, with riot police and armoured vehicles separating the rival groups.
Mr Purnama became governor after his predecessor, Joko “Jokowi” Widodo, was elected president in 2014.
As an ethnic Chinese Indonesian and Christian he is a double minority, and was Jakarta’s first non-Muslim governor for 50 years.
His political success was also seen as a significant development given the violent anti-Chinese riots that occurred in the city in 1998.
Before the blasphemy allegations, he had been widely hailed as a straight-talking politician with a strong anti-corruption stance
But the controversy overshadowed scheduled elections last month.
Despite his enduring popularity with many in Jakarta for his efforts to improve living standards, he lost to conservative Muslim candidate Anies Rasyid Baswedan.
Indonesia is the world’s most-populous Muslim country. About 85% of its population are Muslim, but the country officially respects six religions.