In summer 1795, Shusha was subjected to a major attack by Agha Mohammad Khan Qajar, son of Mohammad Hassan khan who 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 (king) 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, Karabakh Khanate and its fortified capital Shusha, were the first and major obstacle to achieve these ends.