From the early 19th century, Russian ambitions in the Caucasus to increase its territories at the expense of neighbouring Qajar Iran and Ottoman Turkey began to rise. Following the annexation of Georgia in 1801, some of the khanates accepted Russian protectorate in the immediate years afterwards. In 1804, the Russian general Pavel Tsitsianov directly invaded Qajar Iran initiating the Russo-Persian War of 1804–1813. Amidst the war, in 1805, an agreement was made between the Karabakh Khanate and the Russian Empire on the transfer of the Karabakh Khanate to Russia amidst the war, but was not fully realized, as both parties were still at war and the Russians were unable to consolidate any effective possession over Karabakh.