raine was eventually integrated into Muscovite Russia as Rada faced the alternatives of subjection to Poland, allegiance to Turkey, or allegiance to Muscovy and chose the latter as the Cossack Hetmanate as recorded in the 1654 Treaty of Pereyaslav. There followed the Russo-Polish War which ended in 1667. After the partitions of Poland at the end of the 18th century by Prussia, Habsburg Austria, and Russia, Western Ukrainian Galicia was taken over by Austria.
The Crimean Khanate was one of the strongest powers in Eastern Europe until the 18th century; at one point it even succeeded, under the Crimean khan Devlet I Giray, to devastate Moscow. The Russian population of the borderlands suffered annual Tatar invasions and tens of thousands of soldiers were required to protect the southern boundaries. From the beginning of the 16th century until the end of 17th century the Crimean Tatar raider bands made almost annual forays into agricultural Slavic lands searching for captives to sell as slaves. According to Orest Subtelny, "from 1450 to 1586, eighty-six Tatar raids were recorded, and from 1600 to 1647, seventy." In 1688, Tatars captured a record number of 60,000 Ukrainians. This was a heavy burden for the state, and slowed its social and economic development. Since Crimean Tatars did not permit settlement of Russians to southern regions where the soil is better and the season is long enough, Muscovy had to depend on poorer regions and labour-intensive agriculture. Poland-Lithuania, Moldavia and Wallachia were also subjected to extensive slave raiding. The Crimean Khanate was conquered by the Russian Empire in 1778, bringing an end to what remained of Mongol and Tatar rule in Europe.
The Ruin
In 1657–1686 came "The Ruin," a devastating 30-year war amongst Russia, Poland, Turks and Cossacks for control of Ukraine, which occurred at about the same time as the Deluge of Poland. For three years, Khmelnytsky's armies controlled present-day