The fact is, Atheism is not opposed to religion, per se, but is at best (or at worst) indifferent to religion. Stalin was a Soviet first, an Atheist only incidentally.
To a census-taker, who asked him in 1872 if he was a Catholic, Hugo replied, "No. A Freethinker." Hugo predicted that Christianity would soon disappear, but men would still believe in God.