The town lies 106 kilometres (66 mi) west of Baku. It has more than 20,000 inhabitants, among them Azerbaijanis (95%) and Russians. Once Shamakhi was famous for its traditional dancers, the Shamakhi Dancers. Though Shamakhi has suffered from attack, earthquake and siege, it remains rich in historical and cultural monuments, chief among them the Baba Zinda near the settlement of Maraza.
In its history eleven major earthquakes have rocked Shamakhi, but each time it was reconstructed by its inhabitants due to role as economic and administrative capital of Shirvan and one of the key towns on the way of the Silk Road. The only building to have survived eight of the eleven earthquakes is the landmark Juma Mosque (8th century CE).
Shamakhi was first mentioned as Kamachia by ancient Greco-Roman geographer Claudius Ptolemaeus in the 1st to 2nd century CE. It was an important town during the Middle Ages and served as capital of the Shirvanshah state from the 8th to 15th centuries and capital of the independent Shirvan Khanate, also known as khanate of Shamakhi. The catholic friar, missionary and explorer William of Ruysbroeck passed there on his return journey from the Mongol Great Khan's court.
In the middle of the 16th century it was the seat of an English commercial factory, under the traveler Anthony Jenkinson, afterwards envoy extraordinary of the khan of Shirvan to Tsar Ivan IV the Terrible of Russia.
Adam Olearius, who visited Shamakhi in 1637, wrote: "Its inhabitants are in part Armenians and Georgians, who have their particular language; they would not understand each other if they did not use Turkish, which is common to all and very familiar, not only in Shirvan, but also everywhere in Persia." The Russians first entered Shirvan in 1723, but soon retired leaving it to Ottomans who possessed it in 1723-35. In 1742 Shamakhi was taken and destroyed by Nadir Shah of Persia, who, to punish the inhabitants for their Sunnite creed, built a new town under the same name about 26 kilometres (16 mi) to the west, at the foot of the main chain of the Caucasus Mountains. The new Shamakhi was at different times a residence of the Shirvan Khanate, but it was finally abandoned, and the old town rebuilt. In the mid-1700s, the population of Shamakhi was about 60,000, most of whom were Armenians. The Shirvan Khanate was finally annexed by Russia in 1805.
The British Penny Cyclopaedia stated in 1833 that "The bulk of the population of Shirvan consists of the Tahtar, 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 devastation from the sack of the city "in the most barbarous manner by the highlanders of Daghestan" in 1717. The Encyclopedia 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.
- The 1191 earthquake was so destructive that the capital of Shirvan was transferred to Baku.
- The 1667 earthquake is considered to have been the worst with a death toll of 80,000; one-third of the city collapsed, according to the Persian merchants' reports.[who?]
- The 1859 Shamakhi earthquake on December 2 caused the shifting of the same-named government center to Baku.
- The 1872 earthquake triggered emigration to Baku, where oil production had started in industrial proportions.
- In 1902, a devastating earthquake destroyed the 10th-century Juma Mosque.
- Falaki Shirvani,poet, (1107, (Shamakhi - 1157, Shamakhi)
- Khagani Shirvani, poet, (1121/1122, Shamakhi - 1190, Tabriz)
- Imadaddin Nasimi, poet, (1369, Shamakhi –1417, Aleppo)
- Zeynalabdin Shirvani, geographer, historian, ethnographer, philosopher and poet (16 August 1780, Shamakhi — 1838, near Jeddah)
- Seyid Azim Shirvani, poet, (July 10, 1835 - 1 Iyun 1888)
- Alexander Shirvanzade (Movsisyan), novelist, playwright (April 18, 1858, Shamakhi - August 7, 1935, Kislovodsk)
- Mirza Alakbar Sabir, poet (May 30, 1862, Shamakhi – July 12, 1911, Shamakhi)
- Hovhannes Abelian, actor (October 23, 1865, Shamakhi - July 1, 1936, Yerevan)
- Abbas Sahhat, poet (1874, Shamakhi – 11 July 1918, Ganja)
- Muhammed hadi, poet (1879, Shamakhi - 1920 Ganja)
- Zivar bey Ahmadbeyov, architect (1873 Shamakhi - 1925 Baku)
- Sultan Mejid Qanizade, teacher, writer
- Kostan Zarian, writer (February 2, 1885, Shamakhi - December 11, 1969, Yerevan)
- Armen Ohanian, dancer, actress, writer, political activist (1887, Shamakhi - 1976, Mexico)
Sources and references
- Adam Olearius. Relation du voyage de Adam Olearius en Moscovie, Tartarie et Perse..., vol. 1, traduit de l'allemand par A. de Wicquefort, Paris, 1666, p 405-406.
- "Shamaki, reckoned the capital of this province, stands on a river which falls into the Caspian-Sea, and is about sixty-six miles from Derbent towards the south, and ninety-two from Gangea to the south-east. This city was one of the best and most populous of Persia, before it was destroyed by an earthquake. It is, however, supposed to contain near 60,000 inhabitants, chiefly Armenians and strangers, whom the pleasantness of the country and traffic have invited thither" (An Universal History: From the Earliest Accounts to the Present Time, by George Sale, George Psalmanazar, Archibald Bower, George Shelvocke, John Campbell, John Swinton, vol. 43, London, 1765, p. 138)
- The Penny Cyclopædia of the Society for the Diffusion of Useful Knowledge, vol. XI, London, 1833, p. 174-175.
- The Encyclopedia Britannica, vol. 21, Philadelphia, 1894, p. 831, article "Shirvan."
- Brockhaus and Efron Encyclopedic Dictionary. Shemakha
- NGDC. "Comments for the Significant Earthquake". Retrieved 27 August 2010.
- Каталог землетрясений Российской Империи (The Catalogue of the Earthquakes in the Russian Empire).
- This article incorporates text from a publication now in the public domain: Chisholm, Hugh, ed. (1911). Encyclopædia Britannica (11th ed.). Cambridge University Press.