A 1769 letter by Georgian king Heraclius II to Russian diplomat Count P. Panin states that there was "an ancient fortress in the realm of the Khamsa [melikdoms]" which was "conquered, through deceit" by "one Muslim man from the Jevanshir tribe." Suvorov writes that the Armenian prince Melik Shahnazar of Varanda surrendered his fortress Shushikala to "certain Panah", whom he called a chief of nomadic Muslims living near the Karabakh borders. Russian historian P. G. Butkov (1775–1857) writes that "Shushi village" was given to Panah Ali Khan by the Melik-Shahnazarian prince after they entered into an alliance, and that Panah Ali Khan fortified the village. The missionary Joseph Wolff (1795–1862), during his mission in the Middle East, visited "Shushee, in the province of Carabagh, in Armenia Major".
thumb|left|The [[House of Khurshidbanu Natavan|Palace of Khurshidbanu Natavan, the daughter of the last ruler of Karabakh Khanate, late 19th-early 20th centuries]]
thumb|The Armenian quarters of Shusha – with the [[Ghazanchetsots Cathedral in the background – in the early 20th century, before their destruction by Azerbaijani military units in 1920]]
Some sources, including Mirza Jamal Javanshir, Mirza Adigozal bey, Abbasgulu Bakikhanov and Mirza Yusuf Nersesov, attest to the foundation of the town in 1750–1752 (according to other sources, 1756–1757) by Panah Ali Khan (), the founder and the first ruler of the Karabakh Khanate (1748–1822), which comprised both Lowland and Highland Karabakh. The mid-18th century foundation is supported by the second edition of the Encyclopaedia of Islam, one of the most significant chronicles on the history of Karabakh in 18th-19th centuries, the Karabakh nobility assembled to discuss the danger of invasion from Iran and told Panah Ali Khan, "We must build among the impassable mountains such an inviolable and inaccessible fort, so that no strong enemy could take it." Melik Shahnazar of Varanda, who was the first of the Armenian meliks (dukes) to accept the suzerainty of Panah Ali Khan and who would remain his loyal supporter, suggested a location for the new fortress. Thus, Panahabad-Shusha was founded.
According to Mirza Jamal Javanshir, before Panah Ali Khan constructed the fortress there were no buildings there and it was used as cropland and pasture by the people of the nearby village of Shoshi. Panah khan resettled to Shusha the population of Shahbulag and some nearby villages and built strong fortifications.
Conflict with the Qajars
upright=1.35|thumb|19th-century map
Although Panah Ali Khan had been in conflict with Nader Shah, the new ruler of Persia, Adil Shah, issued a firman (decree) recognizing Panah Ali as the Khan of Karabakh. Less than a year after Shusha was founded, the Karabakh Khanate was attacked by Mohammad Hassan Khan Qajar, one of the major claimants to the Iranian throne. During the Safavid Empire Karabakh was for almost two centuries ruled by Ziyad-oglu family of the clan of Qajars (of Turkic origin).
Muhammed Hassan Khan besieged Shusha (Panahabad at that time) but soon had to retreat because of the attack on his territory by his major opponent, Karim Khan Zand. His retreat was so hasty that he even left his cannons under the walls of Shusha fortress. Panah Ali Khan counterattacked the retreating troops of Mohammad Hassan khan and even briefly took Ardabil across the Aras River.
In 1756 (or 1759), Shusha and the Karabakh Khanate underwent a new attack from Fath-Ali Khan Afshar, ruler of Urmia. With his 30,000 strong army, Fath-Ali Khan also managed to gain support from the meliks of Jraberd and Talish (Gulistan), however, Melik Shahnazar of Varanda continued to support Panah Ali Khan. The Siege of Shusha lasted for six months and Fath-Ali Khan eventually had to retreat.
When Karim Khan Zand took control of much of Iran, he forced Panah Ali Khan to come to Shiraz (capital of Zand-ruled Iran), where he died as a hostage. Panah Ali Khan's son Ibrahim Khalil Khan was sent back to Karabakh as governor. Under him, the Karabakh Khanate became one of the strongest state formations and Shusha grew. According to travellers who visited Shusha at the end of 18th-early 19th centuries the town had about 2,000 houses and approximately 10,000 population.
thumb|left|Shusha fortress in 2021
In summer 1795, Shusha was subjected to a major attack by Agha Mohammad Khan Qajar, son of Mohammad Hassan Khan who had attacked Shusha in 1752. Agha Mohammad Khan Qajar's goal was to end with the feudal fragmentation and to restore the old Safavid State in Iran. By early 1795, he had already secured mainland Iran and was directly afterwards poised to bring the entire Caucasus region back within the Iranian domains. For this purpose he also wanted to proclaim himself Shah of Iran. However, according to the Safavid tradition, the shah had to take control over the whole of South Caucasus and Dagestan before his coronation. Therefore, the Karabakh Khanate and its fortified capital Shusha were the first and major obstacle to achieve these ends.
Agha Mohammad Khan Qajar besieged Shusha with the centre part of a 70,000-strong army, after having crossed the Aras River. The right and left wings were sent to resubjugate Shirvan-Dagestan and Erivan respectively. Agha Mohammad Khan himself led the centre part of the main army, besieging Shusha between 8 July and 9 August 1795. Ibrahim Khalil khan mobilized the population for a long-term defence. The number of militia in Shusha reached 15,000. Women fought together with men. The Armenian population of Karabakh also actively participated in this struggle against the Iranians and fought side by side with the Muslim population, jointly organizing ambushes in the mountains and forests.
The siege lasted for 33 days. Not being able to capture Shusha, Agha Mohammad Khan ceased the siege and advanced to Tiflis (present-day Tbilisi), which despite desperate resistance was occupied and exposed to unprecedented destruction. Ibrahim Khalil Khan eventually surrendered to Mohammad Khan after negotiations, including the paying of regular tribute and to surrender hostages, although the Qajar forces were still denied entrance to Shusha. Since the main objective was Georgia, Mohammad Khan was willing to have Karabakh secured by this agreement for now, for he and his army subsequently moved further.
In 1797, Agha Mohammad Shah Qajar, having successfully resubjugated Georgia and the wider Caucasus and having declared himself shah, decided to carry out a second attack on Karabakh.
Trying to avenge his previous humiliating defeat, Agha Mohammad Shah devastated the surrounding villages near Shusha. The population had not recovered from the previous 1795 attack and also suffered from a serious drought which lasted for three years. The artillery of the attackers also inflicted serious losses on the city defenders. Thus, in 1797 Agha Mohammad Shah succeeded in seizing Shusha and Ibrahim Khalil Khan had to flee to Dagestan.
However, several days after the seizure of Shusha, Agha Mohammad Khan was killed in mysterious circumstances by his bodyguards in the town. Ibrahim Khalil Khan returned to Shusha and ordered that the shah's body be honourably buried until further instructions from the nephew and heir of Agha Mohammad Shah, Baba Khan, who soon assumed the title of Fath-Ali Shah. Ibrahim Khan, in order to maintain peaceful relations with Tehran and retain his position as the Khan of Karabakh, gave his daughter Agha Begom, known as Aghabaji, as one of the wives of the new shah. along most of the other khanates they possessed in the Caucasus, as belonging to Russia, comprising present-day Dagestan and most of the modern-day Republic of Azerbaijan, while officially ceding Georgia as well, thus irrevocably losing the greater part of its Caucasian territories. Absolute consolidation of Russian power over Karabakh and the recently conquered parts of the Caucasus from Iran were confirmed with the outcome of the Russo-Persian War of 1826–1828 and the ensuing Treaty of Turkmenchay of 1828.
thumb|[[Ghazanchetsots Cathedral, opened in 1887]]
During the Russo-Persian War of 1826–1828, the citadel at Shusha held out for several months and never fell. After this Shusha ceased to be a capital of a khanate, which was dissolved in 1822, and instead became an administrative capital first of the Karabakh province (1822–1840), and then of the Shusha Uyezd of the Elisabethpol Governorate (1840–1923). Shusha grew and developed, with successive waves of migrants moving to the city, particularly Armenians, who formed a demographic majority in the surrounding highlands.
Beginning from the 1830s the town was divided into two parts: Turkic-speaking Muslims lived in the eastern lower quarters, while Armenian Christians settled in the relatively new western upper quarters of the town. The Muslim part of the town was divided into seventeen quarters. Each quarter had its own mosque, Turkish bath, water-spring and also a quarter representative, who would be elected from among the elders (aksakals) and would function similarly to the head of a modern-day municipality. The Armenian part of the town consisted of 12 quarters, five churches, a town and district school and a girls' seminary.
The population of the town primarily dealt with trade, horse-breeding, carpet-weaving and wine and vodka production. Shusha was also the biggest centre of silk production in the Caucasus. Most of the Muslim population of the town and of Karabakh, in general, was engaged in sheep and horse-breeding and therefore, had a semi-nomadic lifestyle, spending wintertime in lowland Karabakh in wintering pastures and spring and summer in summering pastures in Shusha and other mountainous parts.
In the 19th century, Shusha was one of the great cities of the Caucasus, larger and more prosperous than either Baku or Yerevan. Standing in the middle of a net of caravan routes, it had ten caravanserais.
After World War I and subsequent collapse of the Russian Empire, Karabakh was claimed by Azerbaijan to be part of the Azerbaijan Democratic Republic, a decision hotly disputed by neighbouring Armenia and by Karabakh's Armenian population, which claimed Karabakh as part of the First Republic of Armenia. With the capture of Baku, a small force of Turkish troops entered Shusha on 7 October 1918, also occupying the road to Aghdam. Whilst the Armenians of Shusha did not resist the Turks to avoid violence, the Turks with their limited troops were unable to seize the countryside of Karabakh which was held by an armed milita of local Armenians. After the defeat of Ottoman Empire in the World War I, Armenian forces under Andranik Ozanian defeated Azerbaijani forces under Khosrov bey Sultanov in Abdallyar (Lachin), and began heading down the Lachin corridor towards Shusha. Shortly before Andranik could arrive, British troops under General W. M. Thomson encouraged him to retreat, out of concerns that Armenian military activity could have an adverse effect on the region's status, which was to be decided at the 1919 Paris Peace Conference. Trusting Thomson, Andranik left, and British troops occupied Karabakh. The British command provisionally affirmed Sultanov (appointed by the Azerbaijani government) as the governor-general of Karabakh and Zangezur, pending the final decision by the Paris Peace Conference.
Ethnic conflict began to erupt in the region. Оn 5 June 1919, 600 Armenian inhabitants of the villages surrounding Shusha were massacred by Azerbaijani and Kurdish irregulars. Sultanov stated that the irregulars were not under his control. In August 1919, the Karabakh National Council was forced to enter into a provisional treaty agreement with the Azerbaijani government, recognizing the authority of the Azerbaijan government until the issue of the mountainous part of Karabakh was settled at the Paris Peace Conference. Despite signing the agreement, the Azerbaijani government continuously violated the terms of the treaty, and Sultanov employed severe measures against them, such as terror, blockade and famine. Sultanov gathered troops in the region and on 19 February 1920 issued an ultimatum to the Armenians, demanding they accept unconditional unification with Azerbaijan, and then massacred the population of several Armenian villages, including Khankendi (Stepanakert). which was suppressed by the Azerbaijani army. In late March 1920, the Armenian half of the police forces was reported by a British journalist to have murdered the Azerbaijani half during the latter's traditional Novruz Bayram holiday celebrations. The Armenian surprise attack was organised and coordinated by the forces of the Armenian Republic. Azerbaijani outrage for this surprise attack ultimately led to the massacre and expulsion of the Armenian population in March 1920, in which 500–8,000 A report from Dashnak archives states that 8,000 Armenians escaped from the city, whilst 5,000–6,000 remained behind.
Nadezhda Mandelstam wrote about Shusha in the 1930s, "in this town, which formerly of course was healthy and with every amenity, the picture of catastrophe and massacres was terribly visual. ... They say after the massacres all the wells were full of dead bodies. ... We didn't see anyone in the streets on the mountain. Only in downtown—in the market-square, there were a lot of people, but there wasn't any Armenian among them; all were Muslims".
Soviet era
thumb|View from the town
In 1920, the Bolshevik 11th Red Army invaded Azerbaijan and then Armenia and put an end to the national de facto governments that existed in those two countries. Thereafter, the conflict for the control of Karabakh entered the diplomatic sphere. To attract Armenian public support, the Bolsheviks promised to resolve the issue of the disputed territories, including Karabakh, in favour of Armenia. However, on July 5, 1921, the Kavbiuro of the Communist Party adopted the following decision regarding the future status of Karabakh: "Proceeding from the necessity of national peace among Muslims and Armenians and of the economic ties between upper (mountainous) and lower Karabakh, of its permanent ties with Azerbaijan, mountainous Karabakh is to remain within AzSSR, receiving wide regional autonomy with the administrative centre in Shusha, which is to be included in the autonomous region." As a result, the Mountainous Karabakh Autonomous Region was established within the Azerbaijan SSR in 1923. A few years later, Stepanakert, named after the Armenian communist leader Stepan Shaumyan, became the new regional capital of the Nagorno-Karabakh Autonomous Oblast and soon became its largest town.
thumb|A [[T-72 tank that stood as a memorial commemorating the capture of Shusha by the Armenian forces until it was removed in 2023]]
The decision make Nagorno-Karabakh an autonomous region within Azerbaijan is frequently attributed to Joseph Stalin, who was Commissar of Nationalities at the time, purportedly with the purpose of ensuring Moscow's position as power broker between the Armenian and Azerbaijani SSRs. Stalin participated in the Kavbiuro's meetings on the issue of Nagorno-Karabakh but did not vote.
The town remained half-ruined until the 1960s when the town began to gradually revive due to its recreational potential. In 1977 the Shusha State Historical and Architectural Reserve was established and the town became one of the major resort-towns in the former USSR.
The Armenian quarter continued to lie in ruins until the beginning of the 1960s. In 1961, Baku's communist leadership finally passed a decision to clear away much of the ruins, even though many old buildings still could have been renovated. Three Armenian and one Russian church were demolished and the Armenian part of the town was built up with plain buildings typical of the Khrushchev era.
Nagorno-Karabakh conflict
1988–1994 Nagorno-Karabakh war
thumb|Part of Shusha in ruins in 2010With the start of the First Nagorno-Karabakh War in 1988 Shusha became the most important Azerbaijani stronghold in Karabakh, from where Azerbaijani forces constantly shelled the capital Stepanakert for half a year, leading to hundreds of Armenian civilian casualties and causing mass destruction in Stepanakert. On May 9, 1992, the town was captured by Armenian forces in an operation to lift the siege of Stepanakert and the Azerbaijani population fled. According to Armenian commander Arkady Ter-Tadevosyan, the city was looted and burnt by Armenian citizens from nearby Stepanakert, who had endured months of bombing and shelling from Azerbaijani forces. He also noted it was part of a Karabakh Armenian superstition of burning houses to prevent the enemy from returning. A British journalist witnessed Armenian soldiers using minarets of a mosque in Shusha as shooting targets. As of 2002, ten years later after the city's capture by the Armenian forces, some 80% of the town was in ruins. Armenians also dismantled and sold off historic dark bronze busts of three Azerbaijani musicians and poets from Shusha. Another British journalist who visited Shusha in 1997 reported that the gravestones in the Azerbaijani cemetery on the edge of town were "methodically smashed and vandalised".
After the end of the war, the town was repopulated by Armenians, mostly refugees from Azerbaijan and other parts of Karabakh, as well as members of the Armenian diaspora. The population of the town was significantly less than the pre-war number, and the demographic of the town had changed from mostly Azerbaijani to completely Armenian. The Goris-Stepanakert Highway passes through the town and is a transit and tourist destination for many. There were some hotels in the city, and cultural monuments such as the Ghazanchetsots Cathedral and the Yukhari Govhar Agha Mosque were restored by Armenian authorities.
After the war, a T-72 tank commanded by the Karabakhi Armenian Gagik Avsharian was placed as a memorial. The tank had been hit during the town's capture, killing the driver and gun operator, but Avsharian jumped free from the hatch. The tank was restored and its number, 442, repainted in white on the side. After the Azerbaijani offensive in Nagorno-Karabakh in September 2023 the tank was removed by the Azerbaijani authorities and transferred to the Military Trophy Park in Baku.
2020 Nagorno-Karabakh war
thumb|right|Celebrations in [[Baku, Azerbaijan on 8 November.]]
During the 2020 Nagorno-Karabakh war, Armenia accused the Azerbaijani army of shelling civilian areas and the city's Ghazanchetsots Cathedral. Three journalists were wounded while they were inside the cathedral to film the destruction of a previous shelling on the same day. The Azerbaijani Ministry of Defence denied the shelling of the cathedral by stating that "destruction of the church in Shusha has nothing to do with the activities of the Army of Azerbaijan" The House of Culture was also badly damaged in the fighting.
On November 8, 2020, Azerbaijani President Ilham Aliyev announced that the Azerbaijani army took control of the city of Shusha. The next day, the Azerbaijani Ministry of Defence released a video from the city, confirming full Azerbaijani control. A ceasefire signed two days later reaffirmed Azerbaijan's gains, resulting in the city staying under its control. The Armenian government and the Armenian Apostolic Church subsequently claimed that Azerbaijani soldiers had vandalised Armenian churches and cultural landmarks, including Ghazanchetsots Cathedral and Kanach Zham, which was supported by reports from FreedomHouse and CaucasusHeritageWatch. Azerbaijani officials claimed that the Mamayi Mosque and a nearby fountain was vandalised by Armenian forces. In August 2023, a mass grave was found in Shusha prison. In total 17 corpses with signs of torture were exhumed.
Culture
thumb|upright|Azerbaijani composer [[Uzeyir Hajibeyov (top left) with his family in Shusha, 1915]]
Shusha contains both Armenian and Azerbaijani cultural monuments, while the surrounding territories also include many ancient Armenian villages.
Shusha is often considered the cradle of Azerbaijan's music and poetry and one of the leading centres of the Azerbaijani culture, The city is particularly renowned for its traditional Azerbaijani genre of vocal and instrumental arts called mugham. For the Azerbaijanis, Shusha is the "conservatoire of the Caucasus". Khurshidbanu Natavan, Azerbaijan's most famous woman poet, composer Uzeyir Hajibeyov, opera singer Bulbul and one of Azerbaijan's first twentieth-century novelists, Yusif Vezir Chemenzeminli, were born here. Molla Panah Vagif, a prominent Azerbaijani poet and vizier of the Karabakh khanate, lived and died in Shusha. Vagif Poetry Days were held in Shusha annually since 1982. The tradition was resumed in 2021.
Shusha is also a historical Armenian religious and cultural center. The Armenian population of the town historically had four main churches, each named after the place of origin of the Armenian inhabitants: Ghazanchetsots (after Qazançı; officially named Holy Savior Cathedral), Aguletsos Holy Mother of God Church (after Agulis), Meghretsots Holy Mother of God Church (after Meghri), and Gharabakhtsots (after the region of Karabakh; the church is better known as Kanach Zham). Shusha was also home to a monastery complex called Kusanats Vank ("Virgins' Monastery") or Anapat Kusanats ("Virgins' Hermitage")․
thumb|Armenian composer [[Grikor Mirzaian Suni with his chorus in Shushi (1902)]]
Shusha serves an important role in the history of Armenian music, being the hometown and headquarters of Armenian composer Grikor Suni and his chorus. Suni was an instrumental figure in establishing the national identity of Armenian music and considered one of the many founders of modern Armenian music. In addition, the Khandamirian or Shushi theater which opened in 1891 would become regionally famous for its important contributions to the Armenian cultural arts, especially music. In the Khandamirian theater, Suni gave his first ever performance. By 1902, Suni had organized his Oriental Cultural Ensemble in Shusha and had their first big concert which would get them in trouble with Russian authorities forcing the ensemble out of Shusha where they went on to spread Armenian cultural music around the world. Shusha was also the hometown of Arev Baghdasaryan, the prominent Armenian singer, dancer, and People's Artist of the Armenian SSR.
Shusha is also well known for sileh rugs, floor coverings from the South Caucasus. Those from the Caucasus may have been woven in the vicinity of Shusha. A similar Eastern Anatolian type usually shows a different range of colours.
In November 2020, the organizers of the Turkvision Song Contest stated that they were exploring the possibility of holding the contest's 2021 version in Shusha, and in January 2021, the Azerbaijani Ministry of Culture started preparatory activities on the Khari Bulbul Festival and Days of the Poetry of Vagif.
Museums
During the Soviet period, Shusha was home to museums such as the Shusha Museum of History, the house museum of Azerbaijani composer Uzeyir Hajibeyov, the house museum of the Azerbaijani singer Bulbul, and the Shusha Carpet Museum. The Azerbaijan State Museum of History of Karabakh was founded in Shusha in 1991 shortly before the outbreak of the First Nagorno-Karabakh War.
While the city was under Armenian control, a number of museums were operated there: the State Museum of Fine Arts, G. A. Gabrielyants State Geological Museum, the Shushi History Museum, the Shushi Carpet Museum and the Shushi Art Gallery.
The Shushi History Museum is located in a 19th-century mansion, in the centre of the historical quarter, and had a collection of artefacts related to Shusha from ancient to modern times.
Demographics
{| class="floatright" style="text-align:center; font-size:85%; border:1px solid black; background:#fafafa"
|+
|-
! scope="col" style="width:70px;" | Year
! scope="col" colspan=2 style="width:110px;" | Armenians
! scope="col" colspan=2 style="width:115px;" | Azerbaijanis
! scope="col" colspan=2 style="width:90px;" | Others
! scope="col" style="width:70" | Total
|-
| 1823
|
|
|
|
|
|
!
|-
| 1886
|
|
|
|
|
|
!
|-
| 1897
|
|
|
|
|
|
!
|-
| 1904
|
|
|
|
|
|
!
|-
|1908
|
|
|
|
|
|
!37,591
|-
|1910
|
|
|
|
|
|
!
