After the end of Galicia-Volhynia in the 14th century, Lithuania gained control of most of what is now Ukraine, while the western lands such as Galicia came under Polish rule. In 1569, when Poland and Lithuania united into the Polish-Lithuanian Commonwealth, the expansion of Polish rule extended over the Ukrainian lands under Lithuania. Commonwealth Poland included the Poles, Lithuanians, Ukrainians, Belorussians and Germans. It exposed Ukrainians to a fairly developed civil society. During this period Ukraine, unlike Russia, was exposed to the practice of the Magdeburg City Law, which provided the foundation in Europe of an emerging merchant class that was independent of the landed nobility, as well establishing a tradition of autonomous local government in Ukraine.
At the end of the 18th century, the Polish-Lithuanian Commonwealth itself was deprived of its political state: Russia, Prussia and Austria between 1772 and 1795 partitioned the Commonwealth. In 1772 Ukrainians in Galicia and Bukovyna came under Austrian rule. By 1795 the rest of the Ukrainian lands were annexed by the Russian Empire.