A former Indonesia governor  was sentenced Tuesday to two years in jail for insulting the Quran during his re-election campaign last year.

Basuki "Ahok" Tjahaja Purnama, the former governor of Jakarta, was facing up to a maximum five years in prison on blasphemy charges, even though prosecutors had recommended probation, according to CNN.

Ahok, a controversial Chinese Christian, repeatedly denied the charges that he offended Islam. The charges stem from remarks he made quoting the Quran that there were no rules against Muslims voting for non-Muslims.

Indonesia is the largest Muslim-majority nation in the world.

His trial was widely seen as a test of religious tolerance in the nation.