The second war, in 1826 – 1828, was also started by Persia with the aim of returning Eastern Transcaucasia. During the fighting, Russian troops captured Nakhichevan, Erivan and Tabriz. This war ended with the Turkmanchai peace, concluded by 22 February (5 March) 1828 in the village of Turkmanchai near the Persian city of Tabriz. Under the terms of the agreement, the Erivan and Nakhichevan Khanates were ceded to Russia. The treaty also confirmed the Gulustan peace of 1813 of the year regarding the right of Russia to keep a navy in the Caspian Sea. In addition, Persia pledged not to hinder the transfer of Armenians to the Russian borders. The Turkmanchay Treaty became the basis of Russian-Iranian relations up to 1917. 
To prevent war due to the assassination of Ambassador AS in 1829 in Tehran. Griboyedov and members of the Russian embassy Feth Ali Shah (1797 – 1834) sent to St. Petersburg with an apology the embassy, headed by Shah’s grandson Prince Khosrow-Mirza . He presented many gifts to Emperor Nicholas I (1825 – 1855), the most valuable of which was the Shah diamond (one of the seven famous historical diamonds) currently stored in the Diamond Fund of Russia. 
As a result of the colonial aspirations of Great Britain, Russia was already in the second quarter of the nineteenth century. entered into a rivalry with her for influence in Persia. For Russia, this country was important in terms of strengthening its position in the Transcaucasus, and later in Central Asia. For Great Britain, it was necessary to exclude any possibility of penetration and even the very threat of penetration of any European state by colonized India by land, that is, through Persia, which had a common border with British India.
In 1834, Mohammed Shah ascended to the Persian throne (reigned before 1848), the son of a talented, but deceased Abbas Mirza. Britain, like Russia, provided financial assistance to Mohammed Shah and sent her military advisers, and since then a constant struggle has begun to be waged between Russia and Great Britain to influence the Persian government. Thus, during the siege of Herat by Iranians in 1837 – 1838. In the headquarters of the Iranian troops were Russian officers and the Russian envoy I.O. Simonich , and the United Kingdom provided assistance to Afghanistan. The British considered Herat a key to India, so they did everything to prevent this city from being ruled by Persia. It was only thanks to the actions of the British squadron in the Persian Gulf that Mohammed Shah withdrew his troops from Herat, and British policy in Persia took over for a while. However, already in 1846, Mohammed Shah concluded an agreement with Russia, under which she received broad commercial and industrial rights, as well as the right to keep permanent military ships in the Persian ports of Astrabad  and Rasht.
Competition with the British, who flooded Persia and Central Asia with their goods, undermined Astrakhan’s foreign trade, through which the Russian principalities had been trading with Persia since the 15th century. (at that time - Khadzhi-Tarkhan; here it is appropriate to recall the Tver merchant Afanasy Nikitin and his “Living Over Three Seas”, where Astrakhan is called “Haztarakhan”).  Even more damage was caused to this trade in 1864 by European transit through the Transcaucasian region. With the closure of this transit in 1883, the import of Russian goods into Persia immediately increased through Meshediser and Gazsk raids.
In 1870, in Astrakhan, an exchange and an exchange committee were opened. By types of goods, the main cargoes were seafood and petroleum products. The export and import of goods through Astrakhan at that time took place mainly in Persia and from there, and only a small part fell on Bukhara, Kokand and Khiva. 
Under Nasreddin Shah (1848 – 1896), Vizier Emir Nezam attempted to carry out reforms to Europeanize the country, but in 1851, as a result of court intrigues, he was killed. Nasreddin Shah influenced travel to Europe in 1873, 1878 and 1889. he himself introduced some innovations and, in the end, earned the hatred of the clergy for infringing on his rights, although in order to please Islam in 1852, Nasreddin Shah attempted to exterminate the Babis sect . The pursuit of sectarians continued in the future. The people did not like the Shah for the burden of taxes and for the Turkic origin of the Qajar dynasty (1779 – 1925) and sometimes revolted, despite the fact that Farsi always remained the official language under Nasreddin Shah.
The Khorasans, having fallen away from the Persian shah, fought the Afghan emir Herat Yar-Mohammed-Khan Alcozay (1842 – 1851) and after his death in 1851 they caused the unsuccessful Persian war with Afghanistan, which was supported by the United Kingdom. Among the reasons for the campaign against Herat was the decision of Nasreddin Shah to assist Russia in the Crimean (Eastern) War (1853 – 1856). 
In connection with the Eastern War, one cannot but mention Russian diplomat Nikolai Adrianovich Anichkov. Only in 1834, Mr. Anichkov found his real vocation when he entered the Asian department of the Ministry of Foreign Affairs.  In 1838, he was appointed Consul General in Tabriz, and since then all his activities until his resignation were linked with Persia. Anichkov became the head of the Russian mission in Tehran in 1854, and in 1856 he was appointed extraordinary envoy and plenipotentiary minister to the court of Nasreddin Shah. During the aforementioned war, Anichkov neutralized the agitatory activities in Persia of the British, who inclined the Shah to join the Turks and, together with them, come out against the Russian troops. Thanks to the decisive and consistent actions of Anichkov, Persia not only did not take any action against Russia, but also kept some tribes from hostile actions against the Russian army and contributed to its concentration in Asia Minor. The capture of Kars by Russian troops in this war was partly the result of Russian-Persian diplomatic relations. 
And in the Russian-Turkish war (1877 – 1878) Persia stood on the side of Russia, threatening the Turkish forces located in Baghdad, which was at that time part of the Ottoman Empire.
Tehran also assisted the Russian authorities in asserting the Turkmen who plagued Persia with their raids: in 1881, Russian envoy Ivan Alekseevich Zinoviev successfully completed negotiations with the Persian government on the border between Persia and the Transcaspian region, which gave Russia the opportunity to complete the pacification of the Turkmen tribes. [12 ]
As a result of a general improvement in relations between Russia and Persia, Russian Iranianists had the opportunity to actively travel to a neighboring country. So, in the XIX century. For scientific purposes, various regions of Persia visited:
Gd Batiushkov (Babids. Persian sect // European Herald. 1897, July),
I.N. Berezin (Journey through Northern Persia. Kazan, 1852; Scientific reports on a trip to the East // Journal of the Ministry of Public Education. 1857, part 95),
K.I. Bogdanovich (A few words about the orography and geology of Northern Persia // News of the Imperial Russian Geographical Society. T. XXIV. St. Petersburg, 1888),
V.F. Dittel (On the three-year trip to the East // Journal of the Ministry of National Education. 1847, part 55),
B.A. Dorn (Bericht über eine wissenschaftliche Reise in dem Kaukasus und den südlichen Küstenländern des Kaspishen Meeres // Bulletin de l'Academie des sciences de St.-Petersbourg. 1862, nouv. Ser., Vol. IV; Atlas to the Journey of B.A. Dorn in the Caucasus and the southern coast of the Caspian Sea. SPb., 1895)
V.A. Zhukovsky (Materials for studying Persian dialects. In 3-x parts. SPb. / Pg., 1888 – 1922; Man and the knowledge of Persian mystics. SPb., 1895; Samples of Persian folk art. SPb., 1902),
ON. Zarudny (Preliminary brief report on the trip to Persia in 1900 – 1901 // Notes of the Imperial Russian Geographical Society, 1902; Journey through Western Persia in 1903 – 1904. // Notes of the Imperial Russian Geographical Society, 1905),
S. Lomnitsky (Persia and Persians. Sketches and essays. 1898 – 1899 – 1900 SPb., 1902),
G.V. Melgunov (On the southern coast of the Caspian Sea // Zapiski AN. 1863, t. 3, app. 5),
M.L. Tomara (Economic situation of Persia. SPb., 1895)
and other scholars who later formed the glory of Russian oriental studies.
With the military-political and diplomatic missions of travel in Persia in the same period undertook:
F. Bakulin (Notes on the routes to the East from Mashhad to Afghanistan. St. Petersburg, 1879)
K.A. Baumgarten (A trip to Eastern Persia in 1894 (Geographic trading research). St. Petersburg, 1896)
I.F. Blaramberg (Statistical Review of Persia // Notes of the Imperial Russian Geographical Society. Kn. VII. SPb., 1853),
K.N. Blumer (Description of the route from Tehran to Bender-Bushir // Collection of geographical, topographical and statistical materials on Asia. 1889, issue XL),
K.K. Bode (Travel Notes // Library for Reading. 1854, T. 123; Journey to Luristan and Aravistan // Library for Reading. 1854, T. 126),
M.A. Gamazov (From the Bosphorus to the Persian Gulf. From notes kept during the four-year journey of the demarcation commission in Turkey and Persia. St. Petersburg, 1898),
mentioned above I.A. Zinoviev (Epic Tales of Iran. SPb., 1855),
A.M. Zolotarev (Military Statistical Essay on Persia. SPb., 1888),
A.N. Kuropatkin (General Report of Lieutenant General Kuropatkin on a trip to Tehran in 1895 for the highest order imposed on him. BM, 1895),
P.V. Maksimovich-Vasilkovsky (Report on a trip to the governorates of Western Persia. In 2-x h. Tiflis, 1903; A Trip to Persia // Proceedings of the Caucasus Department of the Imperial Russian Geographical Society. Tiflis, 1904, Vol. XVII, No. 4),
N.T. Ants (Russian letters from Persia. SPb., 1844),
A.I. Ogranovich (Journey to Persia in 1863. // Military Collection. 1866, No. 11 – 12),
V.A. Oranovsky (Military Statistical Description of the North-Eastern Khorasan, 1894. SPb., 1896),
N.G. Petrusevich (Northeastern provinces of Khorasan / / Notes of the Caucasian Department of the Imperial Russian Geographical Society. Book XI, issue. 2. Tiflis, 1880),
P.A. Rittih (Political and Statistical Essay on Persia. SPb., 1896;
Railway line through Persia. SPb., 1900; Trip to Persia // News of the Imperial Russian Geographical Society. T. XXXVIII, vol. 1. SPb., 1900; Report on a trip to Persia and Persian Balochistan in 1900. In 2's hh. SPb., 1901; Travel to Persia and Persian Baluchistan in 1900. SPb., 1903),
I.I. Stebnitsky (Explanatory Note to the Map of Persia // Notes of the Imperial Russian Geographical Society. Vol. X. VIII, issue. 1. St. Petersburg, 1879),
I.I. Strelbitsky (Trip of the captain Strelbitsky on the Eastern Khorosan  // Collection of geographical, topographical and statistical materials on Asia. 1891, issue XLVI; A brief preliminary sketch of a trip to Persia in 1891, // Ibid. 1892, issue LI) ,
P.A. Tomilov (Report on the Persian General Staff Captain Tomilov’s visit to 1900 in the year. In 2's h.Tiflis, 1902),
A.G. Tumansky (From the Caspian Sea to the Strait of Hormuz and back, 1894, // Collection of geographical, topographical and statistical materials on Asia. 1896, issue LXV),
N.V. Khanykov (Mémoire sur l'ethnographie de la Perse. Paris, 1866; Notes on the Ethnography of Persia. M., 1977; Expedition to Khorasan. M., 1973),
N.N. von der Hoven (Path from Tehran to the Persian Gulf // Collection of geographical, topographical and statistical materials on Asia. 1893, issue LIV),
E.I. Chirikov (Traveling Journal of E.I. Chirikov, Russian Commissioner-Mediator for Turkish-Persian Delimitation, 1849 – 1852 // Zapiski Kavkazskoi otdelo Imperial Russian Geographical Society. Prince IX. Tiflis, 1875)
and other military orientalists and diplomats, whose works also enriched Russian science. All this had a beneficial effect on the study of Persia geographically, culturally, historically, linguistically, religiously, statistically, economically and ethnographically.
Business ties developed between Petersburg and Tehran. So, in the last quarter of the XIX century. Russia received a number of road, telegraph and other concessions in Persia. In particular, it was assumed that the destination of the Russian railway will be the city of Chakhbar , located on the shores of the Arabian Sea near the Persian – British India border . If this plan were implemented, Russia would receive a transport corridor to the non-freezing seas, which was one of the geopolitical tasks of Russian foreign policy, and the position of Great Britain would be seriously weakened not only in the East. 
Russia continued to develop active trade with Persia. In 1890, a Russian Bank of Records was established in Tehran, which became a kind of indicator of the depth of penetration of Russian capital into the country's economy. 
In July, 1879, with the assistance of Russian officers in Persia, was formed by the Persian of His Majesty Shah Cossack regiment on the model of the Cossack regiments. The Russian officers were the commanding officers of the regiment, and the lower ranks were recruited from the local population.
In 1882, the regiment was reformed into a brigade. Nominally, the brigade was subordinate to the military minister of Persia, really - to the Russian envoy in Tehran, guided by the instructions of the Military Ministry of Russia. The brigade commander — the head of training for the Persian cavalry — was an advisor to the Shah. All material expenses for the maintenance of the brigade was borne by the Persian government. The main task of the brigade was to protect the Shah and senior officials of Persia, as well as guard duty at diplomatic missions, consulates, ministries and departments, arsenals, banks, maintaining law and order and fiscal functions. 
Vladimir Andreevich Kosagovsky, appointed in 1890 as lieutenant colonel in charge of training the Persian cavalry, that is, the commander of the Persian brigade, and in that capacity to 1903, played a major role in the formation of the Persian Cossack brigade, having become a colonel (1894) and general major (1900). It was under him that the Persian Brigade became the force that played a large role in expanding and strengthening the military and political influence of Russia in Persia in the late XIX - early XX century  (his "Outline of the Development of the Persian Cossack Brigade. Diary" was published in No. 4 magazine "New East" in 1923 g.). Kosagovsky showed himself as a military orientalist: his numerous works on Persia, remaining in manuscripts, are stored in the RGVIA (f. 76, op. 1).
In the zero years of the XX century. Russian influence on the Persian court reached such a level that one of the Russian orientalist officers, Konstantin Nikolaevich Smirnov, in 1907 was appointed tutor to the heir to the Persian throne, Soltan Ahmed Mirza, and remained in that capacity until 1914 (his “Notes of the Persian Shah "were published in Tel Aviv in 2002 g.). 
In the summer of 1916, the brigade was reorganized into a division. The Russian government has assumed the increased costs of its maintenance. To suppress anti-government protests since the fall of 1916, the territorial units were formed, were part of the organizational divisions: Ardabil, Astrabad, Gilan, Zendzhansky, Isfahan, Kazvinsky, Kermanshahsky, Kurdistan, Luristan, Mazanderansky, Mashhad, Rasht, Tabriz , Tehran , Urmiysky, Khamadansky and Khorosansky. The division also included the Arag battalion, escort platoon and non-combatant command of the division headquarters. A cadet corps was opened to replenish the personnel of the division.
As a result of the Russian revolutions that took place in 1917, the military-political situation in Persia changed: Great Britain, taking advantage of the weakening of Russia, and also fearing the penetration of Persian Bolshevik agitators into Persia, did not miss the opportunity to establish full control over this most important in all respects Middle Eastern country. From December 1917, the British government assumed all costs of maintaining the Persian division. In the autumn of 1920, by agreement of the British with Ahmed Shah (1909 – 1925), all Russian divisional ranks were replaced by British ones. Eventually, in November 1920, the Persian Cossack division was disbanded. 
The decision of the fate of the Persian Cossack division became a peculiar sign, marking the end of the presence of pre-Soviet Russia in Persia.
 See: Acts relating to the conclusion of peace with Persia. SPb., 1828.
 See: A. Berzhe. Khosrow-Mirza. 1813 – 1875. Historical and biographical essay // Old Russian. 1879, T. 25.
 See. A. Mal'shinsky. The true case of the death of Griboedov // Russian Bulletin. 1890, No. 6 – 7.
 See his book: Memoirs of the Minister Plenipotentiary. M., 1967.
Under Simonitch, the future eminent researcher of Islamic law N.E. Tornau
 Astrabad in 1930 was renamed Gorgan.
 See: Monuments of diplomatic and trade relations between Moscow Russia and Persia. [Comp. - N.I. Veselovsky]. In 3-x tt. SPb., 1890 – 1898.
 See: F. Bakulin Trading Essays with Persia. SPb., 1875.
 Religious sect that existed in 1840 – 50's. Proclaimed the principles of social justice basis of government. Great importance in teaching was attached to numerology (the sacred number is “19”). See: Kazbekbek M. Bab and Babida. SPb., 1865; Batiushkov G. Babida. Persian sect // Bulletin of Europe. 1897, July.
 See: M. Benyukov, Russia and England in Persia // Russian Gazette. 1877, No. 10; Zinoviev I. Russia, England and Persia. SPb., 1912.
 See: Essay stories Ministry of Foreign Affairs. 1802 – 1902. SPb., 1902.
 See: Kars Blockade: Eyewitness Letters on 1855's Campaign in Asian Turkey. Tiflis, 1856.
 See: N. Grodekov. War in Turkmenistan. Skobelev's hike in 1880 – 1881 T. IV. SPb., 1884; Kuropatkin A.N. The conquest of Turkmenistan. SPb., 1899.
 In the pre-Soviet spelling, spelling through “o” was allowed in both cases.
 The modern name is Chahbehar (province Sistan and Baluchistan).
 The current border of Iran with Pakistan.
 See: P.M. Romanov Railway question in Persia and measures for the development of Russian-Persian trade. SPb., 1891; Rittih P. Railway track through Persia. SPb., 1900.
 See: M.L. Tomara The economic situation of Persia. SPb., 1895; Tigranov L.F. From the socio-economic relations in Persia. Tiflis, 1905; Bogdanov L.F. Persia in geographical, domestic, commercial, industrial and administrative terms. SPb., 1909; Sobotsinsky L.A. Persia. Statistical and economic essay. SPb., 1914.
 RGVIA. F. 13185, op. 1.
 Service record of Major General VA Kosagovsky // RGVIA. F. 409, op. 1, d. 317 – 686.
 [Materials for the performance description of K.N. Smirnova] // RGVIA. F. 1300, op. 1, d. 1220; “Personal Archive Fund K.N. Smirnova ”is stored in the Institute of Manuscripts. K.S. Kekelidze Academy of Sciences of Georgia (f. 39).
 Modern transcription of Tabriz - Tabriz.
 RGVIA. F. 13185, op. 2.