 From 1917, he worked with the Bolsheviks and became one of the 26 Baku Commissars of the Soviet Commune which was established in the city of Baku after the October Revolution.He was the People's Commissar of agriculture and from May 1918, Deputy Chairman of the Council of Peasant Deputies of the district of Baku.On June 18, 1918, he authored a law that confiscated landowners' land and transferred it to the peasants who worked on it.