After the Treaty of Turkmenchay was signed between the Tsarist and Persian empires as a result of the Russo-Persian War of 1826-1828, Russia began to clarify some contradictory points with the Ottoman Empire. Tensions were high between the Tsarist and Ottoman empires, due to Russia’s explicit support of Eastern Europe’s “Slavs”, who had been controlled by the Ottoman Empire for approximately 350 years, and to the rebellion by Greeks in the Ottoman Empire. Thus, after the failure of the diplomatic missions and mutual correspondence, on 26 April 1828 Nicholas I, the Tsar of Tsarist Empire, officially declared war on Ottoman Empire. As a result of the two-year war in 1828-1829, on September 14, 1829, a peace treaty was signed between the Russian and Ottoman empires in Edirne (Adrianople) with the defeat of Ottoman Empire.
Like the Treaty of Turkmenchay, the Treaty of Edirne also consisted of 16 Articles. Article I in the treaty dealt with the ending of the war in general, and Articles II, III, and IV established the borders between the two empires in Rumelia (part of the Ottoman Empire in Europe) and Anatolia. Article IV stated that the Ottoman Empire recognized the occupation of the South Caucasus by the Tsarist Empire and its sovereignty over a part of Ahalsik pashalic (or pashalik, an administrative unit in the Ottoman Empire). Under the terms of Articles V and VI, Romania and Serbia were awarded an autonomous status, with certain conditions. Russian merchants were granted special privileges and exclusive rights to conduct trade in the Black Sea and Mediterranean Sea areas, as well as throughout the Ottoman Empire. Articles VIII, IX, X, and XI explained regulations regarding indemnity, diplomatic relations, and meeting the conditions stipulated in the Treaty of Edirne. The part of this treaty that was crucial to Azerbaijan’s history, and particularly that of Karabakh, was Article XIII, which was similar to Article XV in the Treaty of Turkmenchay. According to Article XIII, the ethnic minorities in each empire, which supported opposite sides during the 1828-1829 war, were allowed to settle in the territories of the other empire within 18 months.
Eventually, as a result of the Treaty of Edirne, the Armenian population of the Ottoman Empire was given the right to settle in Azerbaijan, as it was the case in the Treaty of Turkmenchay. According to Shavrov, a Russian historian, in 1829-1830 approximately 85,000 Armenians settled in Azerbaijan. As mentioned previously, during that period, for the settlement of Armenians in Azerbaijan 200,000 dessiatine lands were allocated from the land of Treasury and special territories worth 2 million manats at that time were purchased from Muslim landowners.
Thus, the settlement of Armenians from the Ottoman and Persian empires in Azerbaijan, under the terms of the treaties of Turkmenchay and Edirne, paved the way for public-political-demographic changes in Azerbaijan. These people settled mainly in Karabakh and surrounding regions. The most serious demographic problems at that time therefore occurred particularly in these regions. According to the Tsarist Empire’s population census of 1823, Armenians constituted only 8.4 percent of the entire population in Karabakh, and the remaining 91 percent were ethnic Azerbaijanis. However, the demographic situation changed dramatically in Karabakh when Armenians from the Persian and Ottoman empires settled in the region. According to the Tsarist Empire’s 1832 population census, the population of Karabakh consisted of 64.8 percent ethnic Azerbaijanis and 34.8 percent ethnic Armenians. As can be seen from the above statistics, the Armenian population of Karabakh had quadrupled in a decade, while the ethnic Azerbaijani percentage had fallen. The purpose of the Tsarist Empire in carrying out this migration policy was to strengthen its position in the South Caucasus and increase the Christian (particularly Armenian) population of the region, in order to ensure that it would be able to control the Muslim population in the region easily.
 Turan, Şerafeddin, “1829 Edirne Andlaşması”, Ankara Dil-Tarih-Coğrafya Fakültesi Dergisi, Vol. 9, No. 1-2, 1951, pp. 114-116-135.
 “Rusiya-Osmanlı Ədirnə müqaviləsi. 2 sentyabr 1829-cu il”, Heydərov, T.K., Bağırov, T.R. and Şükürov, K.K., (eds.), Qafqazda “erməni məsələsi”. Rusiya arxiv sənədləri və nəşrləri üzrə, (Three Volume), Vol. 1, (Bakı: “Elm” nəşriyyatı, 2010), pp. 177-186. See also: Turan, “1829 Edirne Andlaşması”, pp. 136- 142.
 Шавров, Н.Н., Новая угроза Русскому делу Закавказе: Престояшая распродажа Мугани инородцам (Баку, 1990), pp. 59-64.
 Кавказский календарь Российской империи 1897, Л-13-Елизаветская губерния (С-Петербург, 1904), p. 3. See also: Azərbaycan tarixi, Vol. 4, (2007), p. 52. See also: Seyidova, Sevinc, “Ermənilərin Qafqaza köçürülməsi siyasəti “erməni məsələsi”nin tərkib hissəsi və Ermənistan-Azərbaycan Dağlıq Qarabağ münaqişəsinin səbəblərindən biri kimi”, Pedaqoji Universitet Xəbərləri-humanitar elmlər bölməsi, No. 1, 2013, p. 79.