Baltic Germans (Deutsch-Balten or Deutschbalten, later Baltendeutsche) were ethnic German inhabitants of the eastern shores of the Baltic Sea, in what today are Estonia and Latvia. Since their coerced resettlement in 1939, Baltic Germans have markedly declined as a geographically determined ethnic group. However, it is estimated that several thousand people with some form of (Baltic) German identity still reside in Latvia and Estonia. Since the Middle Ages, native German-speakers formed the majority of merchants and clergy, and the large majority of the local landowning nobility who effectively constituted a ruling class over indigenous Latvian and Estonian non-nobles. By the time a distinct Baltic German ethnic identity began emerging in the 19th century, the majority of self-identifying Baltic Germans were non-nobles belonging mostly to the urban and professional middle class. In the 12th and 13th centuries, Catholic German traders and crusaders (see Ostsiedlung) began settling in the eastern Baltic territories. With the decline of Latin, German became the dominant language of official documents, commerce, education and government. The Baltic Germans, along with the Transylvanian Saxons from Transylvania, Romania, and the Zipser Germans from both Slovakia and Romania (Spiš respectively Maramureș and Bucovina), are one of the three oldest German-speaking and ethnic Germans groups of the German diaspora in Central and Eastern Europe. The majority of medieval Catholic settlers and their German-speaking descendants lived in the local towns of medieval Livonia. However, a small wealthy elite formed the Baltic nobility, acquiring large rural estates. When Sweden had ceded its Livonian territories to the Russian Empire after the Great Northern War (1700–1721), many of these German-speaking aristocrats began taking high positions in the military, political and civilian life of the Russian Empire, particularly in its capital city Saint Petersburg. Most Baltic Germans were citizens of the Russian Empire until Estonia and Latvia achieved independence in 1918.