Following the Swedish defeat in the Finnish War of 1808-1809 and the signing of the Treaty of Fredrikshamn on 17 September 1809, the eastern half of Sweden, the area that then became Finland was incorporated into the Russian Empire as an autonomous grand duchy.
Saint Petersburg gradually extended and consolidated its control over the Caucasus in the course of the 19th century at the expense of Persia through the Russo-Persian Wars of 1804-13 and 1826-28 and the respectively ensuing treaties of Gulistan and Turkmenchay, as well as through the Caucasian War (1817-1864).