section_path: History/Before the 20th century
section_name: Before the 20th century
paragraph_text: Before the 20th century
  
  In the 9th and 10th centuries, after the formation of the neighboring Christian states of Sweden, Denmark, Poland, and Kievan Rus, the lands of the present-day Baltic countries remained " pagan " until the 13th century. In the first half of the 13th century the military orders of monks based in the lands of the Livonians and Prussians (Livonian Brothers of the Sword and the Teutonic Order) and the Kingdom of Denmark conquered most of the territory of modern-day Baltic countries and prevented the Estonians, Curonians, Latvians (Latgalians), Livonians, Prussians, Nadruvians, Selonians, Skalvians and Semigalians from creating their own states. Only the Lithuanians (including Samogitians) living farthest from the centers of German colonization succeeded in creating their own state. The Grand Duchy of Lithuania concluded the Union of Krevo with the Kingdom of Poland in 1385 and together resisted the advance of the orders to the east.
  
  In 13th century Catholicism spread into Lithuania. During the 16th century Protestant Reformation, Estonians and most Latvians converted from Catholicism to Lutheranism. The Grand Duchy of Lithuania and Kingdom of Poland formed the Polish-Lithuanian Commonwealth in 1569. In the middle of 17th century, Sweden conquered Estonia and Livonia (with the exception of Courland, Latgale). After the Great Northern War (1700–1721), both provinces became part of the Russian Empire, during the partitions of the Polish–Lithuanian Commonwealth, Russia also annexed Courland, Latgale, and all of Lithuania.
  
  Estonians and Latvians managed to preserve their language and culture despite the invasions and centuries of foreign rule. The formation of the Lithuanian nation was made difficult due to repression by the Russian imperial authorities after the suppressed uprising of 1830–1831 and the uprising of 1863–1864. In the 19th century the nationalist movements of Estonians, Latvians and Lithuanians gained new momentum. Although the historical, economic and cultural development of the peoples in the three countries had been different, the respective Estonian, Latvian, and Lithuanian national identities were formed by the end of the 19th century. Some ideas of unity between Finns and Estonians, as well as between Latvians and Lithuanians started to spread in the 19th century.