The blasphemy case was a decisive factor in Ahok's defeat to a Muslim candidate in last month's election

An Indonesian court on Tuesday sentenced the minority Christian governor of Jakarta to two years in prison for blaspheming the Quran.

The five-judge panel said Gov. Basuki “Ahok” Tjahaja Purnama was “convincingly proven guilty of blasphemy” and ordered his arrest.

He was taken to Cipinang Prison in east Jakarta, said one of his lawyers, Ronny Talampessy. Ahok said he would appeal but it was unclear if he would be released once an appeal was underway.

Outside the court, supporters of Ahok wept and hugged each other amid shouts of jubilation from members of conservative Islamic groups.

“Here we have witnessed that the judge has become a representative of God, that the judge has upheld justice,” said Syamsu Hilal, a member of an anti-blasphemy group who reported Ahok to police last year.

Massive protests in the past six months against Ahok and Tuesday’s verdict are among mounting signs of an increasing religious conservatism in the world’s most populous Muslim nation, which has been traditionally been seen as a bulwark of tolerance and pluralism in the Islamic world.

Vigilante groups frequently attempt with impunity to prevent Indonesia’s religious minorities from practicing their faith and the country’s gay community has faced a surge in persecution in the past two years.

The blasphemy case was a decisive factor in Ahok’s defeat to a Muslim candidate in last month’s election for Jakarta governor. Hard-line Islamic groups opposed to having a non-Muslim leader for the city capitalised on the trial to draw hundreds of thousands to anti-Ahok protests in Jakarta that shook the centrist government of President Joko “Jokowi” Widodo.

The two-year prison sentence was a surprise outcome after prosecutors had recommended two years of probation.

The maximum sentence for blasphemy in Muslim-majority Indonesia is five years in prison.

The lead judge, Dwiarso Budi Santiarto, said the trial was a purely criminal one and the court disagreed that there were political aspects to the case.

He said Ahok’s comment during the election campaign that people were being deceived if they believed the Quran forbids Muslims from voting for non-Muslims had degraded and insulted Islam.

“As part of a religious society, the defendant should be careful to not use words with negative connotations regarding the symbols of religions including the religion of the defendant himself,” he said.

Wayan Sudirta, another lawyer for Ahok, said there was “so much pressure” for Ahok to be imprisoned.

“We can understand but we cannot accept the verdict. Therefore we will appeal,” he said.