stated in 1833 that "The bulk of the population of Shirvan consists of the Tatar, or, to speak more correctly, Turkish race, with some admixture of Arabs and Persians. . . . Besides the Mohammedans, who form the mass of the population, there are many Armenians, some Jews, and a few Gipsies. According to the official returns of 1831, the number of males belonging to the Mohammedan population was 62.934; Armenians, 6,375; Jews, 332; total males 69,641. The prevalent language of Shirvan is what is there called Toorkee or Turkish, which is also used in Azerbijan." The same source also states that according to the official returns of 1832, the city of Shamakhi was inhabited by only 2,233 families, as a result of the devastation from the sack of the city "in the most barbarous manner by the highlanders of Daghestan" in 1717. The Encyclopædia Britannica stated that in 1873 the city had 25,087 inhabitants, "of which 18680 were Tartars and Shachsevans, 5177 were Armenians, and 1230 Russians." Silk production continued to be the main output, with 130 silk-winding establishments, owned mostly by Armenians, although the industry had considerably declined since 1864. Shamakhi was the capital of the Shamakhi Governorate of the Russian Empire until the devastating earthquake of 1859, when the capital of the province was transferred to Baku. The importance of the city declined sharply afterwards. According to the Brockhaus and Efron Encyclopedic Dictionary (vol. 77, p. 460, published in 1903), Shamakhi had 20008 inhabitants (10450 males and 9558 females), of which 3% were Russians, 18% were Armenians, and 79% "Azerbaijani Tatars." With regard to religion, 79% of the population was Muslim, of which 22% was Sunni and the rest Shiite; the remaining 21% was "Armeno-Gregorian" (members of the Armenian Apostolic Church) and "Pravoslav" (Orthodox). The "Queen of Shemakha" is a major protagonist in the poem "The Tale of the Golden Cockerel" by Alexander Pushkin, on which the opera "The Golden Cockerel" by Nikolay Rimsky-Korsakov was based. The character, however, is totally fictional and bears no actual relation to the city. Demographics According to the State Statistics Committee, as of 2018, the population of city recorded 103,900 persons, which increased by 22,500 persons (about 27.6 percent) from 81,400 persons in 2000. 52,100 of total population are men, 51,800 are women. More than 28 percent of the population (about 29,000 persons) consists of young people and teenagers aged 14–29.