The Republic of Latvia can boast of a culture and traditions that are centuries old, but records of inhabitants in the area are a millennium old. The territory that is now Latvia was first inhabited soon after the Ice Age, in approximately 9000 BC. Ancestors of Baltic Finn peoples lived in the area since approximately 3000 BC, but during the first half of the second millennium BC the first proto-Baltic tribes entered the area and the culture of the Baltic (Selonians, Semgallians, Couronians, Latgallians) and Finno-Ugric (Livian) tribes was formed.
In the 12th century, the independent evolution of the tribes and communities living along the Baltic Sea in the area of present day Latvia was curtailed by the arrival of western European (primarily German) crusaders travelling east to spread the Catholic faith and the expansion of feudalism. The city of Riga was founded in 1201. By the 1270's, the crusaders had established the state of Livonia, a political union of territories belonging to the Livonian Order of Knights and to the Catholic church, covering the homelands of the Couronians, Semgallians, Latgallians, Selonians and Finno-Ugrians (Estonians and Livs) in the territory of present-day Latvia and Estonia. Regular economic and cultural ties were developed between Livonia and neighbouring areas of Europe. In 1282 Riga was admitted into the Hanseatic League of northern Germany, thereby assuming a central mediating role in east-west trade. However, while Riga began to flourish as a large trading centre, the trade and property rights of non-Germans in Riga were severely restricted. At the same time, it must be noted that the political and economic unity of the Livonian order eventually stimulated the unification of the local tribes into one (Latvian) linguistic community.
After the Livonian Wars (1558-1583), which were begun by the state of Moscow which wanted access to the Baltic Sea, Livonia was divided between Sweden and Poland-Lithuania. In the 17th century the Duchy of Kurzeme, a semi-independent state paying tribute to Poland, became so successful that for a short while it held colonies in Africa in Gambia and on the Caribbean island of Tobago, where people with Latvian, of semi-Latvian names can still be found today. The addition of Latvian territories to the Russian Empire began with the new wave of Russian expansion in 1700, most notably after the Great Northern War (1700-1721). The period of change from feudalism to capitalist industrialism began at the end of the 18th century, and with the abolishment of serfdom, industry began to develop rapidly and the population grew.
The beginning of the 19th century heralded the onset of the consolidation of the Latvian nation, when Latvians first began to consider themselves to be members of a viable separate nation. The first Latvian language newspapers were published. A group from the Latvian intelligentsia, referring to theselves as the "Young Latvians", was instrumental in developing the Latvian literary style, and Latvian culture, and a national awakening in the middle of the 19th century can be linked to their efforts to achieve for the Latvian nation, the same rights other nations enjoyed. These efforts also signaled the beginning of a fight for national self-determination. Beginning in the 1880's the Russian government began a programme of deliberate Russification in the Baltic provinces, which endangered both the autonomy of the Balto-Germanic provinces, as well as the burgeoning nationalistic movements of the Baltic peoples.