During Medieval times this land (including southern Estonia) was called Livonia. In 1201, at the request of Pope Innocent III, German crusaders (knights) conquered large parts of it and founded Riga.
In the late 13th century the Hanseatic League emerged. It was an economic alliance of cities that dominated trade along the coast of Northern Europe, and the merchant-dominated city of Riga became an important member.
Rome's appointed bishops here were continually charged with expanding the influence of the Catholic church and to protect its interest. Conflicts with German knights who still controlled large portions of the land (apart from the church) continued on into the 16th century.
Poland, Lithuania, Sweden and Russia continued their efforts to control the Baltic lands, and in 1611, after the Polish-Swedish War, parts of Livonia (Latvia) fell under Swedish control.
Russia had long-contested Swedish influence over this land along the Baltic Sea, and from 1700-1721 the Great Northern War raged. In the end Russia was the victor and Latvia, as well as Estonia were now in Russian hands.
The result was a human tragedy for Latvia. The Emperor of Russia's forces quickly destroyed Latvian resources (including food) and a widespread famine soon caused a substantial loss of human life, estimated to be 40% (or more) of the population.
Conditions remained all but unbearable for the workers (peasants) in Latvia on into the early 19th century, but by then, the social structure began to change (albeit slowly) and some basic capitalist freedoms returned.
It was then that nationalism surfaced for the first time, and Latvians began to envision more personal freedoms, and maybe, just maybe, an independent (separate) nation would be possible for them.
In the early 20th century, that Latvian desire for independence was a front-burner issue across the country, and it exploded into a fever during the 1905 Russian Revolution, when a wave of mass political and social unrest spread across the Russian Empire.
Then in 1914, World War I raised its ugly, destructive head across Europe. The war devastated the Baltic countries, but in the end some major participants were politically defeated and ceased to exist; including the German and Russian imperial powers.
For Latvia, this proved an opportunity not to be missed and it proclaimed the independence of their new country in the capital city of Riga on November 18, 1918.
Soon the established map of Europe would be completely redrawn, as a number of smaller states had now surfaced. The League of Nations was formed whose principal mission was to maintain world peace, especially across Europe. The success of their mission would be short-lived.
In 1939, the German-Soviet powerbase (Stalin and Hitler) in an effort to control the European continent, signed a secret agreement that literally divided eastern Europe, and the Soviets had their greedy eye once again on Latvia, as well as Estonia.