different front Between 1805 and 1816, Qajar rulers began invading Herat in neighboring Afghanistan with small detachments. The Persians were attempting to retake control of the city but were forced to abandon it due to Afghan uprisings. In 1818 the Shah sent his son Mohammad Vali Mirza to capture the city but he was defeated at the Battle of Kafir Qala. Russo-Persian War (1826–1828) In 1826, 13 years after the Treaty of Gulistan, the Shah on the advice of British agents and the utter dissatisfaction with the outcome of the previous war, Fath Ali Shah decided to occupy the lost territories. Crown prince Abbas Mirza, head of the armies, invaded the Talysh Khanate and Karabakh khanate with an army of 35,000 on 16 July 1826. The first year of the war was very successful, and the Persians managed to regain most of their lost territories of the 1804–1813 war, including the principal cities of Lenkoran, Quba, and Baku. However the tide turned after the winter. In May 1827, Ivan Paskevich, Governor of Caucasus, invaded Echmiadzin, Nakhichevan, Abbasabad and on 1 October Erivan. Fourteen days later, General Eristov entered Tabriz. In January 1828, when the Russians reached the shores of Lake Urmia, Abbas Mirza urgently signed the Treaty of Turkmenchay on 2 February 1828. Treaty of Turkmenchay The Turkmenchay Treaty was signed on 21 February 1828 by Hajji Mirza Abol Hasan Khan and General Ivan Paskevich. By this treaty the Erivan khanate (most of present-day Armenia, and also a small part of Eastern Anatolia), Nakhchivan khanate (most of the present-day Nakhchivan Autonomous Republic of Azerbaijan), the Talysh Khanate (southeastern Azerbaijan), and the Ordubad and Mughan came under the rule of Imperial Russia. By this treaty, Iran had lost all of its Caucasian territories comprising all of Transcaucasia and Dagestan to neighboring Imperial Russia. Iran furthermore pledged to pay Russia 10 Million in Gold, and in return Russia pledged to support Abbas Mirza as heir to the Persian throne after the death of Fath Ali Shah. The treaty also stipulated the resettlement of Armenians from Persia to the Caucasus, which also included an outright liberation of Armenian captives who were brought and had lived in Iran since 1804 or as far back as 1795. Later life Fath Ali later employed writers and painters to make a book about his wars with Russia, inspired by the Shahnameh of Ferdowsi. This book, considered by