Latvia, along the southern part of the Baltic littoral, is inhabited chiefly by Letts. As early as the 13th century the Letts fought against the Germans (battle of Durbe, 1260), but in the long run the Germans carried the day, and the state created by the Teutonic Order under the form of a Federal Republic (consisting of Estonia, Latgale, Livonia, and Courland) lasted until 1560. Eventually, Estonia passed under the rule of Sweden, Latgale and Livonia under that of Lithuania-Poland, while Piltene and Oesel became Danish. Courland alone retained her independence under the form of a vassal duchy of Lithuania-Poland. In 1621 Livonia was annexed by Sweden, and in 1710 by Russia. In 1772, after the first partition of Poland, Latgale was assigned to Russia, and in 1795 Courland joined Russia. From this time onwards, Latvia was under Russian rule.