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. 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 defense. The number of militia in Shusha reached 15,000. Women fought together with