The lands of Belarus during the Middle Ages were split between different principalities, including Polotsk, Turov, Vitebsk, and others. Following the Mongol invasions of the 13th century, these lands were absorbed by the Grand Duchy of Lithuania, which later was merged into the Polish–Lithuanian Commonwealth. Following the Partitions of Poland, Belarusian territories became part of the Russian Empire. In the aftermath of the Russian Revolution, different states arose competing for legitimacy amid the Russian Civil War, ultimately ending with the consolidation of the Byelorussian Soviet Socialist Republic, which became a constituent republic of the Soviet Union when it was founded in 1922. Belarus became an independent state in 1991 following the dissolution of the Soviet Union. The history of Belarus begins with the migration and expansion of the Slavic peoples through Eastern Europe between the 6th and 8th centuries. East Slavs settled on the territory of present-day Belarus, Russia and Ukraine, assimilating local Baltic (Yotvingians, Dnieper Balts), Finns (in Russia) and steppe nomads (in Ukraine) already living there, their early ethnic integrations contributed to the gradual differentiation of the East Slavs. These East Slavs, pagan, animistic, agrarian people, had an economy which included trade in agricultural produce, game, furs, honey, beeswax and amber. The modern Belarusian ethnos was probably formed on the basis of the three Slavic tribes—Kryvians, Drehovians, and Radzimians—as well as several Baltic tribes. During the 9th and 10th centuries, Scandinavian Vikings established trade posts on the way from Scandinavia to the Byzantine Empire. The network of lakes and rivers crossing East Slav territory provided a lucrative trade route between the two civilizations. In the course of trade, they gradually took sovereignty over the tribes of East Slavs, at least to the point required by improvements in trade. The Rus' rulers invaded the Byzantine Empire on few occasions, but eventually they allied against the Bulgars.