Fath Ali Shah`s agreement with Britain played a key role in the signing of the treaty. With the defeat of the Russo-Persian war, the Shah understood that another Russian attack was almost inevitable. Britain regarded the war as not winning for the Persians and used it to strengthen its foreign policy. With its newly acquired diplomatic ties with the British, Persia founded the Defence Alliance Treaty in 1812, which promised that Britain would “offer a defence alliance against further Russian attacks.” Its conditions basically meant that Persia would defend itself against any European army that invaded India, which deployed most of the British troops, in exchange for military and financial resistance from Britain against any future Russian attack.  The Treaty of Turkmenchay (Russian: “Persian:” ترکمنچای) was an agreement between Iran Gaddafi and the Russian Empire, which ended the Russo-Persian War (1826-28). Signed on February 2, 1828 in Torkamanchay, Iran. The treaty gave Persia control of several territories from the South Caucasus to Russia: the Erivan Khanat, the Nakhchivan Khanat and the rest of the Talysch Khanate. The border between Russia and Persia was fixed on the Aras River. The territories are now Armenia, the south of the Republic of Azerbaijan, Nakhchivan and the province of I`dr (now part of Turkey). Iran lost all its territories north of the Aras River, which included Dagestan, all of Georgia and parts of Armenia and Azerbaijan. (…) The Shah also waived Iran`s rights to sail in the Caspian Sea and granted Russia exclusive rights to maintain a military fleet there, with surrender rights for trade inside Iran. In exchange, Russia promised to support Crown Prince Abbas Mirza as heir to the Iranian throne.
After the devastating Russo-Iranian war of 1804-1813, Iranian leaders viewed the Gulistan Treaty as a ceasefire allowing Iran to regroup. (…) Continued Russian intervention in the South Caucasus regions and ill-treatment of Muslim populations have weighed heavily on Russian-Iranian relations. General Alexei Iommolov, the new Russian commander-in-chief in the Caucasus, shared his predecessor Tsitsianov`s worldview with the “Asians” and engaged in war as a means of achieving Russia`s political goals. In May 1826, Russia occupied mirak in the Erivan Khanat, in violation of the Treaty of Gulistan, which provovat the next and final battle of hostilities between the two.  After the war and the signing of the treaty, the anti-Russian atmosphere prevailed in Persia. On February 11, 1829, an angry mob stormed the Russian embassy in Tehran, killing almost everyone inside. Among those killed in the massacre was the newly appointed ambassador to Persia, Aleksander Griboyedov, a famous Russian playwright. Griboyedov had played an active role in the negotiations on the terms of the treaty.  The Treaty of Gulistan left the possibility of conflict between the two countries and was therefore weak from the outset. Russia`s main priority before the war was to focus on the wars with Napoleon, which explains the small number of troops it devoted to the Russo-Persian war.
The Treaty of Gulistan was above all a way for both countries to “blow” so that the Russo-Persian war could end and they could focus on other subjects. After the signing of the treaty, Persia began to rebuild its army quickly, with Fath Ali Shah devoting himself fully to the recovery of lost territories. It was no surprise to anyone that Fath Ali Shah ordered his military commander Abbas Mirza to begin training troops in 1823, three years before the Second Russo-Persian War of the century, which was three times more military preparation than he had devoted to the first war.