but larger Shaddadid emirate centered at Ani. The Kars emirate was a vassal of the Saltukids in Erzurum, whose forces were effective in opposing Georgian attempts at seizing Kars. Thus, it was only in 1206 that Zakare of the Zakarids–Mkhargrdzeli succeeded in capturing Kars, joining it to their fiefdom of Ani. It was conquered in 1242 by the Mongols and later Kars fell under Georgian influence. During the reign of David IX of Georgia, the Ilkhanate occupied the southern territories of the Kingdom of Georgia, which included Kars. By 1358, the city was ruled by the Jalayirids and in 1380 it fell to the Qara Qoyunlu. In 1387 the city was leveled and the surrounding countryside was devastated by Timur (Tamerlane). Anatolian beyliks followed for some time after that, until it firstly fell into the hands of the Qara Qoyunlu and subsequent Aq Qoyunlu. After the Ak Koyunlu, as it went naturally for almost all their former territories, the city fell into the hands of the newly established Safavid dynasty of Iran, founded by king Ismail I. Following the Peace of Amasya of 1555 that followed the Ottoman–Safavid War of 1533–1555, the city was declared neutral, and its existing fortress was destroyed. In 1585, during the Ottoman–Safavid War of 1579–1590, the Ottomans took the city alongside Tabriz. On June 8, 1604, during the next bout of hostilities between the two archrivals, the Ottoman–Safavid War of 1603–1618, Safavid ruler Abbas I retook the city from the Ottomans. The fortifications of the city were rebuilt by the Ottoman Sultan Murad III and were strong enough to withstand a siege by Nader Shah of Persia, in 1731. It became the head of a sanjak in the Ottoman Erzurum vilayet. In August 1745, a huge Ottoman army was routed at Kars by Nader Shah during the Ottoman–Persian War of 1743–1746. As a result, the Turks fled westwards, raiding their own lands as they went. Russian administration In 1807 Kars successfully resisted an attack by the Russian Empire. During a break between the Russian campaigns in the region conducted against the Ottomans, in 1821, commander-in-chief Abbas Mirza of Qajar Iran occupied Kars, further igniting the Ottoman-Persian War of 1821-1823. After another Russian siege in 1828 the city was surrendered by the Ottomans on June 23, 1828, to the Russian general Count Ivan Paskevich, 11,000 men becoming prisoners of war. At the end of the war