Hard-line Islamic groups opposing Mr. Basuki were seen celebrating.
Shortly after the verdict, the governor was taken to Cipinang Penitentiary in Jakarta, which houses criminals including drug dealers and rapists. Under Indonesia’s procedural code, the governor was not eligible to remain free during his appeal because the possible sentence he faced was at least five years, according to legal experts.
Mr. Basuki became governor of Jakarta, the country’s political, social and economic center, in 2014 when his predecessor and chief political ally, Joko Widodo, became president. Mr. Basuki, known as Ahok, was only the city’s second non-Muslim governor and had hoped to become its first directly elected non-Muslim leader.
He had been leading in the polls last year, but in September his campaign faltered when he tried to address attacks from Muslim hard-liners who argued that the Quran forbade Muslims from voting for a non-Muslim. Mr. Basuki said those making that argument were misleading Muslims, a statement that was interpreted by some as insulting the Quran.
Conservative Muslim groups organized several mass rallies against him, demanding that he be jailed for blasphemy. Mr. Basuki and his supporters claimed the protests were orchestrated by his political rivals to sabotage his chances of re-election.
Indonesia has more than 190 million Muslims and smaller numbers of Christians, Hindus and Buddhists among its population of 250 million.
The five-judge panel unanimously voted that Mr. Basuki was “proved legally and convincingly guilty of committing the criminal act of blasphemy,” the head judge, Dwiarso Budi Santiarto, said in reading the ruling.
The blasphemy law was created in 1965, and only a handful of people were prosecuted under that law during the next 40 years, according to Andreas Harsono, an Indonesian researcher for Human Rights Watch.
However, he said, the number of people convicted of blasphemy skyrocketed to 106 from 2004 to 2014, during the presidency of Susilo Bambang Yudhoyono, Mr. Joko’s predecessor. Mr. Yudhoyono’s son was eliminated in the first round of the governor election in February.
Mr. Yudhoyono twice publicly denied that he had orchestrated the protests to damage Mr. Basuki’s candidacy.
“It’s a sad day, and it’s frightening,” Mr. Andreas said. “If the governor of Indonesia’s largest and most complex city, and who is an ally of the Indonesian president, can be brought down and humiliated this way, what will happen to normal Indonesian citizens?”
The home affairs minister, Tjahjo Kumolo, told reporters that because the court ordered Mr. Basuki to begin his sentence immediately, Vice Governor Djarot Saiful Hidayat would serve as acting governor until October.