The siege lasted for 33 days. Not being able to capture Shusha, Agha Mohammad Khan, for now, ceased the siege, and advanced to Tiflis (present-day Tbilisi), which despite desperate resistance was occupied and exposed to unprecedented destruction. The Khan of Karabakh, Ibrahim Khan, eventually surrendered to Mohammad Khan after discussions, including the paying of regular tribute and to surrender hostages, though 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.