DEPOK, Indonesia (Reuters) - Indonesia on Thursday released the popular former governor of Jakarta from jail, after serving a reduced two-year sentence for blasphemy against Islam, a case that exposed deep religious divides in the world’s largest Muslim-majority country.

Slideshow ( 7 images )

An ethnic Chinese Christian, Basuki Tjahaja Purnama, 52, lost a 2017 bid to be re-elected governor over charges of insulting the Koran that brought hundreds of thousands of Muslim protesters to the streets, led by hardline Islamist groups.

“My dad’s a free man! Thank you everyone for the support,” his son, Nicholas Sean, said on social media app Instagram, alongside a selfie with his father.

Months of protests and a polarizing election preceded Purnama’s jailing in May 2017, raising concerns over the erosion of Indonesia’s long-held reputation for pluralism and tolerance, and the creeping influence of Islam in politics.

“(Purnama’s) prosecution showed non-Muslims and many Muslims that the freedoms of expression and religion in Indonesia are tenuous,” New York-based Human Rights Watch said.

Purnama’s troubles started with comments that political rivals were deceiving people by using a verse in the Koran to say Muslims should not be led by a non-Muslim.

Later, an incorrectly subtitled video of the comments went viral, eventually leading to his defeat at the polls and his imprisonment on charges of blasphemy.

As a figure with a no-nonsense reputation for cutting through red tape while in office, he remains popular with progressive Indonesians.

“We support him, not because of his religion or beliefs, but because of his good work,” said one of this Muslim supporters, Siti Afifah, who had waited outside the prison for his release.

But Ahok, as he is popularly known in Indonesia, is unlikely to re-enter politics any time soon, media say.

His representatives say he is considering launching a talk show and running his family’s oil trading business.

Last week, in a letter from behind bars, Purnama said he now wanted to be known by his initials “BTP”, and apologized to those hurt by his remarks when in office.

He also urged supporters to exercise their right to vote in April’s presidential election, which many fear may also be tainted by the religious and racial tension that marred the Jakarta governor race two years ago.

President Joko Widodo - once a steadfast ally of Purnama’s - is running for re-election against retired general Prabowo Subianto. Prabowo endorsed the massive protests against Purnama two years ago and backed the winning ticket in that election.

(This story has been refiled to fix day of the week in paragraph one)