A republic on the Baltic and the Gulf of Riga. Although the majority of Latvians are Slavic, the area was long dominated by a German land-owning class, descendants of the Knights of the Tuetonic Order, who conquered the region during the Middle Ages. Latvia was ruled by Poland and Sweden until Russia occupied the territory in the 18th century. During 1917-18, Latvia was occupied by Germany, and in 1918 it declared its independence from Russia. During 1919, the Latvian government fought both the Red Army, which sought to reestablish Russian control, and the Army of the West, which sought to maintain German influence. By the end of 1919, Latvia was able to secure its independence. In 1939, as part of the Soviet-German Non-Aggression Pact, the Soviet Union established military bases in Latvia. In June 1940, Soviet forces seized the country, and in July it was absorbed into the Soviet Union. In July 1941, Germany occupied the country, and many cities overprinted their stocks of Russian stamps for provisional use. In November, German "Ostland" issues were introduced, replacing the many local issues. During 1944-45, Soviet forces again occupied Latvia, and ordinary Russian stamps were again placed into use. Latvia declared its independence on August 21, 1991, and in September, Russia recognized its sovereignty. The last Russian troops were withdrawn in 1994.