It is generally held that the ancestors of modern Latvians entered Latvia during the second millennium B.C. They were farmers and raised livestock. Extensive written documents about events and individuals in Latvia begin in the twelfth century. At that time, most of the peoples of Latvia were pagans, and the country was inhabited by four Baltic tribes (Kursi or Courlanders; Latgali, from whom the Latvian ethnonym has been derived; Sēļi; and Zemgaļi) and a Finno-Ugric tribe, the Livs, who, since they were the first indigenous people contacted by Westerners, provided the early name, Livonia, that was used for the Latvian and Estonian area.
Riga was founded by Germans in AD. 1201 as a base for commerce, missionizing, and military conquest. Latvia's thirteenth-century history is one of interactions and wars between the indigenous tribes and the Lithuanians, Poles, Russians, Germans, Catholic ecclesiastical authorities, Germanic crusading orders, and merchants. By 1300 Germans had gained political and economic control over the country by conquest, and the people were converted to Christianity. For the next several centuries Latvia's neighbors (i.e., Lithuanians, Poles, Russians, and, later, Swedes) attempted to annex the country, and the locals resisted these efforts.
In the late sixteenth century, Livonia was partitioned. Only the duchy of Kurland and Zemgale (1562-1795) retained independence under Polish-Lithuanian suzerainty. In 1721 the country was conquered by czarist Russia, although the duchy of Kurland and Zemgale maintained a separate status for a while. Starting in the thirteenth century, rural Latvians were gradually reduced in legal status, until by 1458 most had become serfs. Latvians living in cities retained free status but were not numerous. Legal vestiges of the serf status were abolished in 1861.
On 18 November 1918, as World War I ended, Latvians declared independence. A war of independence was fought against both Germany and Russia. The war against Germany ended with a peace treaty on 15 July 1920, and the war against the Federal Socialist Republic of the Russian Soviets was concluded by a peace treaty on 11 August 1920. By then Latvia had lost 25 percent of its pre-World War I population, 25 percent of its farm buildings were completely or partially destroyed, 29 percent of its arable land lay fallow, and its industry had virtually disappeared. A period of rebuilding followed; by 1940 per-capita income approximated that of Finland, Hungary, and Italy, and Latvia was emerging as a democratic republic with a constitution based on those of France, Germany, and Switzerland.
After an armed coup d'état on 15 May 1934, however, Latvian Prime Minister Kārlis Ulmanis instituted a dictatorship. The German-Soviet nonaggression treaty of 23 August 1939 assigned Latvia to the Soviet sphere of influence. Projecting an uncertain future, the Latvian government transferred its gold reserves to Western banks and issued extraordinary powers to the Latvian minister in London. On 17 June 1940 Latvia was occupied and on 5 August 1940 incorporated into the Soviet Union as the Latvian SSR. The country's economic, political, and social structures were transformed to the Soviet pattern. This culminated on the night of 13-14 June 1941, when 15,600 individuals were deported to labor camps.
On 22 June 1941 Germany attacked the Soviet Union and occupied Latvia until 8 May 1945. The return of Soviet rule to Latvia meant the reimposition of a harsh totalitarian political and economic system with tens of thousands of new political prisoners being sent to the gulag. With the advent of Gorbachev's glasnost and perestroika, the Soviet Union began to disintegrate, and on 21 August 1991, the Supreme Council of Latvia declared the Republic of Latvia independent again. On 17 September 1991, Latvia was admitted as a member of the United Nations.
Latvia is on the border of Western European and Russian cultural areas. Between 1200 and 1945, the predominant influences on Latvian culture were Western European. The majority of Latvians were members of religions stemming from the West—Lutheranism and Roman Catholicism. The predominant influences in the fine arts, education, and science were Western. Between 1940 and 1991, the Soviet Union made a determined effort to sever West European ties and to reorient Latvian culture toward the Russian. Literary and scientific works, for example, had to be translated from Russian versions rather than from the original language. With the dissolution of the Soviet Union, the Western orientation is resurgent.