Supporters of Gov. Basuki "Ahok" Tjahaja Purnama, the minority Christian governor of Jakarta, gathered outside an Indonesian prison on Tuesday after a court sentenced the governor to two years in prison for blaspheming the Quran.

About 300 supporters of Ahok gathered in front of Cipinang Prison in east Jakarta where the governor was taken after his sentencing, according to Jakarta Globe. They yelled slogans and shook the prison gates in frustration.

"They want to pray for Ahok," the head of East Jakarta Police told Suara.com.

Outside court, weeping supporters were met with 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.

A five-judge panel said Ahok was "convincingly proven guilty of blasphemy" and ordered his arrest. Ahok said he would appeal, but it was unclear if he would be released once an appeal was underway.

The decision came as a shock since the country has a reputation for practicing a moderate form of Islam. Prosecutors had also recommended two years of probation, rather than a two-year prison sentence.

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 capitalized 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 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.