The Soviet Union was hostile to all forms of religion, which was "the opium of the masses" in accordance with Marxist ideology. Relative religious freedom existed for Muslims in the years following the revolution, but in the late 1920s the Soviet government took a strong anti-religious turn.