The Ruin () is a historical term introduced by the Cossack chronicle writer Samiilo Velychko (1670–1728) for the political situation in Ukrainian history during the second half of the 17th century.

The timeframe of the period varies among historians: Some historians such as Mykola Kostomarov define the period between 1663 and 1687, associating it with the three Moscow-appointed hetmans of Left-bank Ukraine (Briukhovetsky, Mnohohrishny and Samoylovych). Other historians interpret the period between 1660 and 1687 from the Chudniv Treaty that led to division among the Cossack community. Borys Krupnytsky considered the timeframe as 1657–1687, from the death of hetman Bohdan Khmelnytsky in 1657, particularly the Pushkar-Barabash Mutiny, until the ascension of hetman Ivan Mazepa in 1687.

The Ruin (Ukrainian history)

The period was characterised by continuous strife, civil war, and foreign intervention by neighbours of Ukraine. A Ukrainian saying of the time, "Від Богдана до Івана не було гетьмана" (From Bohdan to Ivan there was no hetman [in between]), accurately summarises the chaotic events of this period.

The Ruin (Ukrainian history)

Background

The Ruin started after the death of hetman Bohdan Khmelnytsky in 1657. Khmelnytsky had delivered Ukraine from centuries of Polish and Lithuanian domination through the campaigns of the Khmelnytsky Uprising (1648–1657) and Ukraine's Treaty of Pereyaslav (1654) with the Tsardom of Moscow. While Khmelnytsky had operated as a charismatic and influential leader, clearly one of the prominent figures in Ukrainian history, he did not establish clear rules of succession and his will favoured his son Yurii as the new hetman. Yurii Khmelnytsky (1641–1685), young and inexperienced, clearly lacked the charisma and the leadership qualities of his father, as he showed during his attempts to rule (1657, 1659–1663, 1677–1681, 1685).

The Ruin (Ukrainian history)

At the time of Bohdan Khmelnytsky's death, the Cossack state had a territory of about and a population of around 1.2 to 1.5 million. Society consisted of the remaining non-Catholic nobles, the starshina or richer Cossack officers, the mass of the Cossacks and those peasants who did not bear arms. The Orthodox Church held 17% of the land; local nobles held 33%. The remaining 50% had been confiscated from the Poles and was up for grabs. Ukrainians comprised a frontier society with no natural borders, no tradition of statehood and a population committed to Cossack liberty or anarchy.

The confiscated lands could easily change hands in any conflict. There was an unresolved conflict between the mass of poorer cossacks and the wealthier group who aspired to semi-noble status. The state was weak and needed a protector, but of the regional powers, the Poles wanted to take the Ukrainian lands back, Muscovite-Russian autocracy fitted ill with Cossack ideals of liberty, the Crimean Khanate concentrated on Slavic slave-raiding and the Turks of the Ottoman Empire showed little concern for the Ukrainian frontier. The Swedish Empire's territory remained still too far away during this period, and the Don Cossacks and the Kalmucks stayed out of the conflict.

The history of Ukraine in this period became very complex. Basic themes included:

the failure to find a single leader of Ukraine who could pursue a consistent policy the constant switching of alliances with outside powers who had their own interests conflict between richer and poorer Cossacks the influence of the Orthodox Church, which tended to favour coreligionist Moscow

Left and Right Banks 1648–1663

1648-57: Khmelnitsky: Crimea and Russia: Khmelnitsky started his rebellion in alliance with the Khanate of Crimea. When his acceptance of Russian overlordship in 1654 (Treaty of Pereiaslav) led to the Russo-Polish War (1654–1667), the Crimeans switched sides and began raiding Ukraine. In his last years Khmelnitsky backed away from Russia and was negotiating with Sweden and Transylvania.

1657-59: Vyhovsky and the Poles: At the time of Khmelnitsy's death his son Yurii was only 16, so the hetmanate was given to Ivan Vyhovsky (regent). He based his power on the richer cossacks ('starshina') and sought a rapprochement with Poland. This led to a rebellion of the more democratic cossacks Martyn Pushkar and Yakiv Barabash, which was defeated in June 1658, a civil war that cost about 50,000 lives. In September 1658 he signed the Treaty of Hadiach with Poland, which would have turned Ukraine into a third member of the Polish–Lithuanian commonwealth, but the treaty was never implemented. The treaty led to a Muscovite-Ukrainian War where Russians were defeated at the Battle of Konotop on 29 June 1659. Faced with a revolt by several pro-Moscow colonels, Vyhovsky resigned and retired to Poland in October 1659.