Alexander An, 30-years-old, who wrote "God doesn't exist" on his Facebook page, was beaten by a mob of dozens on Wednesday in his hometown in Pulau Punjung, West Sumatra province.
"He is suspected of having blasphemed against Islam," local police chief Chairul Aziz told AFP.
"The man told police investigators that if God really exists and has absolute power, why didn't he prevent bad things from happening in this world."
An said on his Facebook page that he was brought up as a Muslim, like the vast majority in Indonesia, where blasphemy is a punishable crime carrying a maximum five-year prison term.
Dozens of locals stormed into his office after a heated debate with them on Facebook over religion, police said.
An was also an administrator of a Facebook group promoting atheism with 1,243 followers. His postings no longer appeared online following his arrest.
Indonesia is a third-world country that's also notorious of persecuting anti-Islamic beliefs. It was quite remarkable that after beaten by a mob, An was the one who ended up behind bars, an example of backward mentality existing in a highly-religious Islam-dominated country. But, that's Indonesia where opinions not aligned with the religious belief of the majority is a crime.