Basuki
Jakarta's Governor Basuki Tjahaja Purnama gestures inside the courtroom during his blasphemy trial at the North Jakarta District Court in Jakarta, Indonesia, December 27, 2016. Reuters

Jakarta's Christian governor was found guilty of blasphemy against Islam and sentenced to two years in jail on Tuesday after a trial that was seen as a test of religious tolerance in Indonesia, the world's largest Muslim-majority nation.

Basuki Tjahaja 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," head judge Dwiarso Budi Santiarto told the south Jakarta court.

Purnama told the court he would appeal the ruling.

The sentence against the ethnic-Chinese Christian governor, who is popularly known as "Ahok", was harsher than expected and will come as a shock to many of his supporters. TV news coverage of the scene outside the court showed some supporters weeping.

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.

Hardline Islamist groups, whose supporters were also gathered outside the courtroom, had called for the maximum penalty possible over comments he made that they believe insulted the Islamic holy book, the Koran.

Thousands of police were deployed in the capital early on Tuesday in case clashes broke out between Purnama's supporters and opponents. There was no immediate sign of any violence after the court's verdict.

Purnama denied wrongdoing, though he apologised for comments he made last year criticising his opponents' use of the Koran in political campaigning ahead of an election for governor of Jakarta, the country's capital.

Purnama lost his bid for re-election in an April run-off - after the most divisive and religiously charged election in recent years – to a Muslim rival, Anies Baswedan. He will hand over to Baswedan in October.

Analysts say radical Islamic groups, which organised mass protests against Purnama as he sought re-election, had a decisive impact on the outcome of the election.

"Huge setback" for tolerance and minorities

The government has been criticised for not doing enough to protect religious minorities but President Joko Widodo, a key ally of Purnama's, had urged restraint over the trial and called for all sides to respect the legal process.

Andreas Harsono of Human Rights Watch said the guilty verdict against Purnama was "a huge setback" for Indonesia's record of tolerance and for minorities.

"This is bad news for Indonesian minorities," he said. "If someone like Ahok, the governor of the capital, backed by the country's largest political party, ally of the president, can be jailed on groundless accusations, what will others do?"

The tensions whipped up during the Jakarta election have raised concerns about the rising influence of Islamist groups in Indonesia, which is home to sizeable communities of Buddhists, Hindus, Christians and people who adhere to traditional beliefs.

The government said on Monday it would take legal steps to disband Hizb ut-Tahrir Indonesia (HTI), a group that seeks to establish an Islamic caliphate, because its activities were creating social tensions and threatening security.