The Deluge: Khmelnytsky Uprising: The Battle of Berestechko ends with a Polish victory.

The Khmelnytsky Uprising, also known as the Cossack-Polish War, the Chmielnicki Uprising, the Khmelnytsky massacre or the Khmelnytsky insurrection, was a Cossack rebellion that took place between 1648 and 1657 in the eastern territories of the PolishLithuanian Commonwealth, which led to the creation of a Cossack Hetmanate in Ukraine. Under the command of Hetman Bohdan Khmelnytsky, the Zaporozhian Cossacks, allied with the Crimean Tatars and local Ukrainian peasantry, fought against Polish domination and against the Commonwealth forces. The insurgency was accompanied by mass atrocities committed by Cossacks against the civilian population, especially against the Roman Catholic clergy and the Jews.The uprising has a symbolic meaning in the history of Ukraine's relationship with Poland and Russia. It ended the Polish Catholic szlachtas domination over the Ukrainian Orthodox population; at the same time, it led to the eventual incorporation of eastern Ukraine into the Tsardom of Russia initiated by the 1654 Pereiaslav Agreement, whereby the Cossacks would swear allegiance to the Tsar while retaining a wide degree of autonomy. The event triggered a period of political turbulence and infighting in the Hetmanate known as the Ruin. The success of the anti-Polish rebellion, along with internal conflicts in Poland, as well as concurrent wars waged by Poland with Russia and Sweden (the Russo-Polish War (16541667) and Second Northern War (16551660) respectively), ended the Polish Golden Age and caused a secular decline of Polish power during the period known in Polish history as the Deluge.

In Jewish history, the Uprising is known for the concomitant outrages against the Jews who, in their capacity as leaseholders (arendators), were seen by the peasants as their immediate oppressors. However, Shmuel Ettinger argues that both Ukrainian and Polish accounts of the massacres overemphasize the importance of the Jewish role as landlords, while downplaying the religious motivation for Cossack violence.

The Deluge (Polish: potop szwedzki, Lithuanian: švedų tvanas) was a series of mid-17th-century campaigns in the Polish–Lithuanian Commonwealth. In a wider sense it applies to the period between the Khmelnytsky Uprising of 1648 and the Truce of Andrusovo in 1667, thus comprising the Polish theatres of the Russo-Polish and Second Northern Wars. In a stricter sense, the term refers to the Swedish invasion and occupation of the Commonwealth as a theatre of the Second Northern War (1655–1660) only; in Poland and Lithuania this period is called the Swedish Deluge (Polish: potop szwedzki, Swedish: Svenska syndafloden), or less commonly the Russo–Swedish Deluge (Polish: Potop szwedzko-rosyjski) due to the simultaneous Russo-Polish War. The term "deluge" (potop in Polish) was popularized by Henryk Sienkiewicz in his novel The Deluge (1886).

During the wars the Commonwealth lost approximately one third of its population as well as its status as a great power due to invasions by Sweden and Russia. According to Professor Andrzej Rottermund, manager of the Royal Castle in Warsaw, the destruction of Poland in the Deluge was more extensive than the destruction of the country in World War II. Rottermund claims that Swedish invaders robbed the Commonwealth of its most important riches, and most of the stolen items never returned to Poland. Warsaw, the capital of the Polish–Lithuanian Commonwealth, was destroyed by the Swedes, and out of a pre-war population of 20,000, only 2,000 remained in the city after the war. According to the 2012 Polish estimates, financial losses of Poland are estimated at 4 billion złotys. Swedish and Russian invaders destroyed 188 cities and towns, 81 castles, and 136 churches in Poland.