Shamakhi Uyezd

Shamakhi Uyezd (, ) was an administrative unit within the Baku Governorate of the Russian Empire, and then of Azerbaijan Democratic Republic and Azerbaijan SSR with its cenre in the city of Shamakhi until its formal abolishment in 1929 by Soviet authorities. The uyezd was located in central part of the governorate, bordering Javad Uyezd to the south, Baku Uyezd to the east, Geokchai Uyezd to the west and Kuba Uyezd to the north. The administrative center of the uyezd was Shamakhi.
History.
The uyezd was established in 1840 and was initially made part of the , and later became the capital of the in 1846. But due to an earthquake in 1859, the city and most of the uyezd suffered great damage. Subsequently, capital of the Shamakhi Governorate was moved from Shamakhi to Baku and the governorate was renamed Baku Governorate.
After the collapse of the Russian Empire, Shamakhi briefly became part of Transcaucasian Federation. On 28 May 1918, Azerbaijan Democratic Republic declared its independence, but most of its claimed territory was still under the control of the Bolsheviks. It captured Shamakhi on July 1918 and kept the uyezd as part of its administrative units.
After the Red Army invasion of Azerbaijan in 1920, Azerbaijan was integrated into the Soviet Union and the uyezd was abolished by Soviet authorities in 1929.
Population.
According to the 1897 Russian Empire census, 121,842 people inhabited the uyezd, of which 20,007 lived in the city of Shamakhi. The census recorded 89,840 native speakers of Azerbaijani (whom the census indicates as "Tatar"), 14,283 Armenians and 11,362 Russians.
The population declined to 91,185 by 1926.