There are different foundation years of the Shusha fortress in the books of Karabakhnames. The dates stated by the authors of the books regarding the foundation of the fortress do not match historical events of that period. For instance, In this regard, Mirza Adigozel bey writes that Panah Ali Khan had built a big fortress that contains main houses in it and transferred the centre of the Khanate there in 1756/57. He showed that a year after that, Muhammad Hasan Khan Qajar attacked Karabakh. However, it should be noted that, according to historical sources, the attack by Muhammad Hasan Khan Qajar on Karabakh did not occur in 1757, but in late 1751. Precise information about the foundation date of the Shusha fortress is given in the book “The History of Shusha City”, written by Hasan Ikhfa Alizade. According to the author, the fortress was built in 1750-1751, a date that is also accepted by many other historians. Coming to the date (1756/57) that given in above-mentioned information in Karabakhnames regarding to the foundation of the Shusha fortress it is possible to argue that these dates were related to the settlement of the population from the surrounding regions in the Fortress. Some historians therefore believe Shusha fortress was founded in 1750-1756.
The new fortress contained a number of mosques, bathhouses, bazaars and houses, and was called ‘Panahabad’ in honour of Panah Ali Khan, the founder of the Karabakh Khanate. However, it was renamed Shusha during the reign of Ibrahimkhalil Khan, the son of Panah Ali Khan. According to the historical sources the place that the Shusha fortress was founded by Panah Ali Khan previously was grasslands and pasturages of the ancient human settlement that situated 6 km far from the Fortress and called as Shishekend (Shishe village) by the local population. Therefore, even after the foundation of the Panahabad fortress this place was called as the territory of Shishe (Sh[ü]she) village, and during Ibrahimkhalil Khan’s reign, the fortress was described as the territory of Shüshe. Later, Tsarist Russia brought the name into line with the Russian dialect and it was pronounced Shusha. It is also possible to see the transformation of the word Shüshe into Shusha in archival documents of the Ottoman Empire. The name was recorded initially as Shüshe in Ottoman documents, and it was recorded as Shusha afterwards.
The walls of Shusha fortress that was built on defensive purpose are about 8 km long, 5 meters high and over 2 meters thick. To protect the fortress from gunnery, it was built with dense stones and lime. The fortress initially had four gates, but one of them was later closed. The gate that was used for horse-drawn carriages was the main entrance to the fortress. The other two gates were used as secret entry and exit points during wars and difficult times. These gates faced north and west, and were therefore called Ganja-Chilabord and Revan gates, respectively.
Shusha fortress has a significant place in Karabakh architecture. The Fortress located 1400 meters higher than the sea level and there was about approximately 300 meters height difference between upper and lower mahalla (quarter/district) of it. According to the investigation of Hasan Ikhfa Alizade on the architecture of the Shusha fortress, most of the historical and archaeological monuments of the Karabakh Khanate etched and collapsed in time. Although, each quarter of the Shusha Fortress had its own mosque during the Karabakh Khanate and the Tsarist Russia, only a mosque, courthouse, and big caravanserai of the Fortress preserved its existence until modern times. Meanwhile, Baharli, in his work ‘Ahvalat-e Karabakh’ (A Story of Karabakh), states that 18 bathhouses and 8 caravansaries functioned in Shusha until the end of the Karabakh Khanate.
Stones and bricks were mainly used for building Shusha fortress. Stones were mainly used for the walls of the fortress and the mosques, bathhouses, and bazaars. However, bricks were mostly used for building the houses and apartments. The fortress was built in accordance with the ancient and historical architecture of Azerbaijan. During the construction of Shusha fortress, Panah Ali Khan thus invited special architects and master craftsmen from Tabriz, Ardabil and other cities in Azerbaijan. This is why it is possible to see how Azerbaijani architectural style, which has a significant place in Turkic-Islamic culture, predominates in the architectural monuments of Shusha fortress
At the end of the 18th century, the city of Shusha consisted of 17 mahallas (quarter/district) that were divided into upper and lower mahallas. The city’s lower mahallas were Gurdlar, Seyidli, Julfalar, Toylug (Guyulug), Chukhur, Dordler Gurdu, Haji Yusifi, Dord Chinar və Chol Gala, and the upper mahallas were Mir-Khanlıg, Saatli, Kocherli, Mamayı, Khoja Marjanli, Damirchi, Hamam Gabaghı və Taza mahalla. According to historical sources, at the end of the 18th century there were 2,000 families (around 10,000 people) in these mahallas. After the Karabakh Khanate was incorporated into Tsarist Russia in 1805, a third mahalla, called Gazanchali, was built in the mountainous part of the city of Shusha. This mahalla subsequently expanded and consisted of 12 streets throughout the nineteenth century. According to Baharli, a chronographer of Karabakh, the main Muslim population of Shusha lived in the upper and lower mahallas. It seems from this that Gazanchali mahalla was mainly populated by the non-Muslim population of Shusha, namely Armenians and Russians who settled in Karabakh after it was occupied by the Tsarist Empire. In the late 19th century, the population of Shusha declined by approximately two to three thousand people, due to the local population migrating to Iran and other parts of Azerbaijan as a result of the war (1797) between the Karabakh Khanate and Agha Muhammad Shah Qajar, the Shah of Iran, as well as the occupation of the Khanate by the Tsarist Russian Empire. These derelict territories of Karabakh were populated by the non-Muslim at the result of the migration policy of the Tsarist Empire. Consequently, the non-Muslim population of Karabakh increased during the 19th century, while the percentage of the Azerbaijani population decreased.
 Xəzani, Mir Mehdi, “Kitabi-tarixi-Qarabağ”, in Nazim Axundov (ed.), Qarabağnamələr, Vol. 2 (Bakı: Yazıçı, 1991), pp. 116-117. See also: Qarabaği, Mirzə Yusif, “Tarixi-Safi”, in Nazim Axundov (ed.), Qarabağnamələr (Bakı: Yazıçı, 1991), p. 18. See also: Qarabaği, Mirzə Camal Cavanşir, “Qarabağ tarixi”, in Akif Fərzəliyev (ed.), Qarabağnamələr (Bakı: Yazıçı, 1989), p. 145.
 Adıgözəl bəy, Mirzə, “Qarabağnamə”, in Akif Fərzəliyev (ed.), Qarabağnamələr (Bakı: Yazıçı, 1989), pp. 40-41.
 Bakıxanov, Abbasqulu Ağa, Gülüstani İrəm (Bakı, 1951), pp. 160-161.
 Əlizadə, Həsən İxfa, “Şuşa şəhərinin tarixi”, in Nazim Axundov, (ed.), Qarabağnamələr (Bakı: Yazıçı, 1991), p. 316.
 Axundov, Nazim, Qarabağ salnamələri (Bakı: Yazıçı, 1989), p. 36.
 Useynov, M., Bretanitski, L., Salamzadə, A., İstorya Arkhitekturi Azerbaydjane (Moskva, 1963), p. 306.
 Qaradaği, Həsənəli, “Qarabağ vilayətinin qədim və cədid keyfiyyəti və övzaları”, in Nazim Axundov (ed.), Qarabağnamələr (Bakı: Yazıcı, 1991), p. 357.
 Xəzani, “Kitabi-tarixi-Qarabağ”, p. 117.
 Əlizadə, “Şuşa şəhərinin tarixi”, p. 315. See also: “Şuşa”, Azərbaycan Sovet Ensiklopediyası, Vol. 10, (Bakı, 1987), p. 578.
 Başbakanlık Osmanlı Arşivi, Hattı Hümayun (BOA. HH.) Nr. 6666;1760-A; 8488; 110; BOA, Cevdeti Hariciye, Nr. 9076.
 BOA, HH.Nr. 203-A.
 Qarabaği, “Tarixi-Safi”, p. 18.
 Əlizadə, “Şuşa şəhərinin tarixi”, pp. 316-346.
 Baharlı, “Əhvalati-Qarabağ”, in Nazim Axundov (ed.), Qarabağnamələr (Bakı: Yazıçı, 1991), pp. 227-278.
 Əlizadə, “Şuşa şəhərinin tarixi”, p. 342.
 Baharlı, “Əhvalati-Qarabağ”, p. 228. See also: Qarabaği, “Tarixi-Safi”, p. 19.
 Mahmudov, Yaqub, and Camal Mustafayev, Şuşa-Pənahabad (Bakı: Təhsil, 2012), pp. 39-59.
 Baharlı, “Əhvalati-Qarabağ”, p. 278.
 Mahmudov and Mustafayev, Şuşa-Pənahabad, p. 62.