After Soviet occupation in Azerbaijan in 1920, the religious struggle of the Bolsheviks began. Like many other religious institutions, the Shah Abbas Mosque ceased to function and resumed its activities only in 1989.