In 1912 was desyatidvornym representative from Upper Farm Annunciation to St. Catherine stanitsa electoral congress for the election of electors for the election of deputies of the State Duma of the IV Amur and Ussuri Cossack Army, where he was elected as an elector. October 28, 1912 in Khabarovsk at the Cossack congress, was elected to the State Duma of the IV Amur and Ussuri Cossack troops.
In the State Duma joined the Constitutional Democratic faction, participating in the work of the Cossack and Siberian PARLIAMENTARY groups. In addition, he participated in the activities of the Duma committees: on national education and fisheries. At meetings of the Duma has repeatedly advocated the transfer of military schools Amur and Ussuri Cossack troops and others. Cossack troops in the introduction of the Ministry of Education, as the army of the school funded by the proceeds received from the liquor trade.
He took an active part in the February 1917 revolution. In April 1917, he was elected Ataman of the Amur Cossack Army. After the October Revolution of 1917 opposed the Bolshevik government.
From October 1917 to March 1918 actually led the Amur Region. March 6, 1918 led by the so-called "Gamow rebellion" against the Soviet regime, which ended unsuccessfully, and IM Gamow Cossack troops was forced to move to China (Sahalyan), where in June 1918, again invaded the Amur Cossack Army.
Summer - autumn of 1918 H.Valiyev fighting on the front of the Amur in eastern Amur region. Formally submitted to General Croats, but after the establishment of Horvath close links with the Japanese withdrew from him.
September 21, 1918 AN Alexis formed a government of the Amur region, of which entered and Amur Cossack Ataman IM Gamow. After the final establishment of Soviet power in the Far East he was forced to immigrate to China.
He died January 18, 1969 in Zasheln, Switzerland.