At the end of the eighteenth century, the Tsarist Empire used the political turmoil in the Persian Empire as a pretext for strengthening its position in the Caucasus. Kovalenski was thus sent to the region in 1799 to get information about administrative issues, and later on General Lazarev, the Russian military General of Armenian origin, moved to Georgia, together with the Russian army. This resulted in the annexation of eastern Georgia to the Tsarist Empire under the terms of a decree issued by Tsar Alexander I dated 12 September 1801. Along with eastern Georgia, the Gazakh, Borchali, Shamshadil, and Pambak regions of Azerbaijan were also annexed to the Tsarist Empire. This decree marked the start of the Tsarist Empire’s expansionist policy toward Azerbaijan.
In February 1803 Sisianov, the Russian military General of Georgian origin, went to Tiflis (Tbilisi) with a further fifty thousand soldiers as Commander-in-Chief of the Tsarist Empire’s military forces in the Caucasus. One of Sisianov’s assistants was Armenian Ovannes (Ivannes). Sisianov was different from previous generals because he had an aggressive character. He was sent with special instructions to strengthen the Tsarist Empire’s position in the Caucasus. These instructions included using Armenian power as much as possible during the expansion toward the Caucasus.
The first target after the occupation of eastern Georgia was the Jar-Balakan region of Azerbaijan, which occupied a strategic geographical position. Tsarist Russia’s military forces also had a significant pretext for moving into Azerbaijan from Jar-Balakan and occupying Dagestan. Thus, Prince Alexander, the son of the Georgian Tsar, went to Jar-Balakan to get assistance for fighting against the Tsarist Empire’s expansionist policy toward the Caucasus. In the spring of 1803, the Tsarist Empire’s military forces, under the command of General Gulyakov, therefore moved to Jar-Balakan. The battle on the Ganix River ended in victory for General Gulyakov and the occupation of Jar-Balakan by the Tsarist Empire. Under the terms of the “Solemn Plight” (also called the “Oath Agreement”) of April 12, 1803, the Jar-Balakan region of Azerbaijan was annexed to the Tsarist Empire, Jar-Balakan sent a hostage to Tiflis (Tbilisi) as a sign of its good-will. Russian military bases were established in the Jar-Balakan region, Jar-Balakan paid tribute in the form of silk to the Tsarist Empire, and internal regulation of the region was subjected to Jar-Balakan.
General Sisianov’s next expansionist target was to occupy the Ganja Khanate, which was considered a key point for an incursion into Azerbaijan. The aggressive response by Javad Khan, the Khan of the Ganja Khanate, to threatening letters from General Sisianov demanding that the city surrender without putting up any resistance, led to the Battle of Ganja between the Tsarist Empire’s military forces and the Ganja Khanate early in 1804. As a result of the Battle of Ganja on 2-3 January 1804, Javad Khan and his son Huseyngulu were killed and Ganja was annexed to the Tsarist Empire. The name of the city was changed to Yelizavetpol, and anyone who used the word “Ganja” had to pay one pound in silver by way of penalty.
The occupation of Azerbaijan territory by the Tsarist Empire significantly influenced its relations with the Ottoman and Persian empires. All European countries, especially England, were looking for a chance to interfere in order to prevent the Tsarist Empire from expanding southwards, because any occupation of the Caucasus was viewed as a direct threat to their interests in the Middle East. England thus urged the Persian Empire to declare war on the Tsarist Empire in June 1804, because of its expansion toward the Caucasus.
Meanwhile, the Tsarist Empire’s military forces began a march toward Azerbaijan, under the command of General Sisianov. They began to attack Azerbaijan from three different directions: Tiflis (Tbilisi), the North Caucasus, and the Caspian Sea. The occupation of Ganja Khanate and the tragic death of Javad Khan shocked other khanates in Azerbaijan and left them no alternative but to accept the suzerainty of Russia. Thus, Karabakh Khanate (May 14, 1805), Shaki Khanate (May 21, 1805), and Shamakhi Khanate (December 25, 1805) were systematically annexed to the Tsarist Empire.
Early in 1806, the Tsarist Empire’s military forces, under the command of General Sisianov, surrounded the fortress of Baku. During a meeting in February 1806 with Huseyngulu Khan, the Khan of the Baku Khanate, Sisianov was killed by Huseyngulu Khan’s nephew. After Sisianov’s death, all the khanates in Azerbaijan rebelled against the Tsarist Empire. Meanwhile, the Ottoman Empire blocked the Straits with warships, due to Russia’s destructive activities in the Caucasus and the Balkans, which led to tension between two sides. Although everything was in accordance with the agreement of 1798 between the Ottoman and Tsarist empires, as a result of the intervention of England and France, war broke out in October 1806 between the Ottoman and Tsarist empires. 
However, the Tsarist Empire did not give up on its intention of occupying Azerbaijan, even though it was fighting on two different fronts against the Ottoman and Persian empires. Meanwhile, there were local rebellions by the khanates in Azerbaijan against the Tsarist Empire, which were suppressed ruthlessly later on. On June 10, 1804, Ibrahimkhalil Khan, the Khan of the Karabakh Khanate, was killed in Khankendi, together with 17 members of his family. This led to a rebellion in Shaki Khanate by Salim Khan, which managed to destroy the Tsarist Empire’s garrison near the Shaki Khanate. However, the Shaki Khanate rebellion was also suppressed by the Tsarist Empire’s military forces, and Salim Khan escaped to the Persian Empire. As a result, the Tsarist Empire succeed in occupying the cities of Ganja, Shusha, Shamakhi, Iravan, Nakhchivan, Guba, Darband, Baku, Rasht, and Anzali until 1811.
After the occupation of the Lankaran Khanate by the Tsarist Empire in December 1812, the Persian Empire admitted defeat, and on October 24, 1813 a peace treaty between the Tsarist and Persian empires was signed in Gulistan, a village in Karabakh. As a result of the Treaty of Gulistan, the historical territory of Azerbaijan was divided into two parts: the north (except Iravan and Nakhchivan) was annexed to the Tsarist Empire and the south remained in the Persian Empire. This treaty brought to a conclusion the first part of the division of Azerbaijan’s territory between the Tsarist and Persian empires. The Treaty of Gulistan consisted of 11 Articles. Articles II and III defined the borders between the parties. The Persian Empire recognized the suzerainty of the Tsarist Empire over northern Azerbaijan (except Iravan and Nakhchivan khanates), including Ganja, Karabakh, Shaki, Shirvan, Guba, Baku, and Lankaran khanates, along with southern Dagestan and eastern Georgia. According to Article V, the Tsarist Empire held an exclusive right to have warships on the Caspian Sea. Articles VIII, IX and X dealt with trade and customs issues. It is noteworthy that when the Tsar of the Tsarist Empire was about to sign the official documents of the Treaty of Gulistan, it became clear that there was a mistake in the text of the Treaty, since Karabakh and Ganja khanates were not mentioned among the territories that were to be handed over to the Tsarist Empire under the terms of the Treaty of Gulistan. Therefore, in January 1814 the Treaty documents were sent back to the Persian Empire and were ratified only on July 28, 1818.
 Azərbaycan tarixi, Vol. 4, (2007), p. 6.
 BOA. HH.Nr.6677-A. See also: Bakıxanov, Abbasqulu Ağa, Gülüstani İrəm (Bakı, 1951), p. 192.
 Umudlu, Vidadi, Şimali Azərbaycanın çar Rusiyası tərəfindən işğalı və müstəmləkəçilik əleyhinə mübarizə (1801-1828) (Bakı, 2004), pp. 39-62.
 Bakıxanov, Gülüstani İrəm, p. 195.
 Uçarol, Rifat, Siyasi Tarih (1789-1994) (İstanbul: Filiz yayınevi, 1995), pp. 96-98.
 BOA. HH.Nr.6677-A. See also: Qarabaği, Mirzə Yusif, “Tarixi-Safi”, in Nazim Axundov (ed.), Qarabağnamələr (Bakı: Yazıçı, 1991), pp. 50-51.
 “Rusiya və İran arasında Gülüstan müqaviləsi”, in Yaqub Mahmudov and Kərim Şükürov (eds.), Azərbaycan beynəlxalq münasibətlər və diplomatiya tarixi (1639-1828)-Dövlətlərarası müqavilələr və digər xarici siyasət aktları, Vol. 1 (Bakı: Regionların inkişafı ictimai birliyi, 2009), pp. 432-443. See also: Bakıxanov, Gülüstani İrəm, p. 203.