When the capital of Isfahan was put under siege in 1722, Hosayn-Qoli Khan defied the royal orders and refused to send the requested relief force. In the meantime, Russia took full advantage of the situation. With the Safavids on the brink of collapse, they launched a campaign in 1722–1723 that resulted in the annexation of the coastal territories. The Ottomans, also taking advantage of the situation, overran the province of Georgia and other territories to the west of the area that the Russians had captured. By the Treaty of Constantinople, the two powers further divided the annexed territories between them, with the Ottomans again retaining Georgia. The rebellious Hosayn-Qoli Khan, who had sided with the Russians during their invasion in 1722–1723, in what turned out to be an ill-fated alliance, died in exile in Russia in 1737. When the Safavids were restored by Nader Qoli Beg (later known as Nader Shah), the "de facto" ruler of Iran, he restored Iranian dominance in the Caucasus and made Teimuraz II "vali" of Kakheti, while appointing an Iranian as the governor of Kartli. In 1736 Nader deposed the Safavids and became king himself, establishing the Afsharid dynasty.