An Indonesian man who professed his atheism online was sentenced on Thursday to serve two years and six months in prison, according to the Jakarta Post.

Thirty-year-old Alexander Aan was assaulted by a mob and arrested after posting "God does not exist" on Facebook earlier this year. He was found guilty of inciting religious hatred.

"Alex simply stated his personal view on the topic of religion, yet he now faces years in jail," Carlos A. Diaz, President of Atheist Alliance International, said. "This judgement is an affront to the principles of freedom of speech and freedom of conscience. Indonesia's blasphemy laws are archaic, an embarrassment to a country that appears to be striving to join the developed world and should be repealed immediately."

Endy Bayuni, the chief editor of the Jakarta Post, explained to Al Jazeera English on Wednesday that Indonesia's constitution guarantees freedom of religion, but also requires that everyone "have a religion." That provision of the constitution was meant to fight against communism, he explained.

Watch video, courtesy of Al Jazeera English, below: