Muscovy continues its territorial growth through the seventeenth century.
In the southwest, it acquires eastern Ukraine, which had been under Polish rule.
The Ukrainian Cossacks, warriors organized in military formations, live in the frontier areas bordering Poland, the Tatar lands, and Muscovy.
Although they had served in the Polish army as mercenaries, the Ukrainian Cossacks remain fiercely independent and stage a number of uprisings against the Poles.
In 1648 most of Ukrainian society joins the Cossacks in a revolt because of the political, social, religious, and ethnic oppression suffered under Polish rule.
After the Ukrainians had thrown off Polish rule, they need military help to maintain their position.
In 1654 the Ukrainian leader, Bogdan Khmel'nitskiy, offers to place Ukraine under the protection of the Muscovite tsar, Aleksey I, rather than under the Polish king.
Aleksey's acceptance of this offer, which is ratified in the Treaty of Pereyaslavl', leads to a protracted war between Poland and Muscovy.
The Treaty of Andrusovo, which ends the war in 1667, splits Ukraine along the Dnepr River, reuniting the western sector with Poland and leaving the eastern sector self-governing under the suzerainty of the tsar.