The outgoing governor of Jakarta has been sentenced to two years in prison for blasphemy and inciting violence.
He was accused of insulting Islam by referring to a verse in the Koran during a campaign speech.
Mr Purnama denied blasphemy and in court said he would mount an appeal.
His remarks about Islam had sparked outrage among religious hardliners.
They staged regular large rallies calling for him to face trial, with some extremists even calling for him to be executed.