In 1904 he moved to Baku, became one of the founders of "Gummet" organization, set up to do political work amongst Muslims, which grew into a mass organisation, drawing large masses of Muslim people behind the Bolsheviks. Some of its most known members included Meshadi Azizbekov, Nariman Narimanov and Sultan Majid Afandiyev. He led delegate of the Caucasian Union of the RSDLP at the 3rd Congress of the RSDLP in London. He was one of the leaders of the December strike of the workers in Baku, also actively participated in the publishment of the Bolshevik journals and magazines "Bakisnkie Rabochi", "Gudok" and "Bakinski prolitari".