Independent republic, formerly part of the Soviet Union, on the shore of the Baltic Sea, S of Estonia, W of Russia, N of Lithuania and Belarus. The Letts were conquered in the 13th century by the Livonian Brothers of the Sword, and Latvia was incorporated into the southern part of Livonia until 1561, when Livonia passed to Poland . Latvia became part of Russia in 1795, although the Letts remained dominated by German merchants until 1885. A national revival began in Latvia in the mid-19th century, and the country became independent after World War I. Politically unstable, it was absorbed into the USSR in 1940 and was occupied by the Germans during World War II; it was returned to the USSR after the war. In 1990 Latvia’s parliament declared independence and reestablished the old Latvian constitution. In 1991, Russia recognized Latvian independence. In 1993, a new parliament was elected, and Guntis Ulmanis became president. Latvia signed a free trade agreement with Lithuania and Estonia. In 1999, Vaira Vike-Freiberga was elected president, becoming the first female president in eastern Europe. In 2004, Latvia joined NATO and the European Union.