Paliy uprising

In 1699 a new Polish king Augustus II disbanded the Cossack militia and signed a peace treaty with Ottoman Turkey.

Rebellious Cossacks massacred their traditional enemies — Polish szlachta, Catholic priests and Jews — in the area they controlled.

On October 17, 1702 Paliy and his Cossacks were defeated by the Polish army under hetman Adam Mikołaj Sieniawski near the town of Berdychiv and later at Nemirov and at Webricze in February 1703.

Russian Tsar Peter I and left-bank Ukraine ataman Ivan Mazepa, who were allied with Poland against Sweden at the time, intervened diplomatically, arranging a ceasefire, and ordered Paliy to surrender Bila Tserkva, but he and his men refused.

Mazepa convinced Russian Tsar Peter I to allow him to intervene, which he successfully did, taking over major portions of right-bank Ukraine.