Cossacks are a group of predominantly East Slavic people who became known as members of democratic, semi-military communities, predominantly located in Ukraine and in Southern Russia. They inhabited sparsely populated areas and islands in the lower Dnieper, Don, Terek, and Ural river basins and played an important role in the historical and cultural development of both Russia and Ukraine.
The origins of the first Cossacks are disputed, though the Constitution of Pylyp Orlyk claimed Khazar origin. The traditional post-imperial historiography dates the emergence of Cossacks to the 14th or 15th centuries, when two connected groups emerged, the Zaporozhian Sich of the Dnieper and the Don Cossack Host.
The Zaporizhian Sich were a vassal people of Poland–Lithuania during feudal times. Under increasing social and religious pressure from the Commonwealth, in the mid-17th century the Sich declared an independent Cossack Hetmanate, initiated by a rebellion under Bohdan Khmelnytsky. Afterwards, the Treaty of Pereyaslav brought most of the Ukrainian Cossack state under Russian rule. The Sich with its lands became an autonomous region under the Russian-Polish protectorate.
The Don Cossack Host, which had been established by the 16th century, allied with the Tsardom of Russia. Together they began a systematic conquest and colonisation of lands in order to secure the borders on the Volga, the whole of Siberia (see Yermak Timofeyevich), and the Yaik and the Terek Rivers. Cossack communities had developed along the latter two rivers well before the arrival of the Don Cossacks.
By the 18th century, Cossack hosts in the Russian Empire occupied effective buffer zones on its borders. The expansionist ambitions of the Empire relied on ensuring the loyalty of Cossacks, which caused tension given their traditional exercise of freedom, democratic self-rule, and independence. Cossacks, such as Stenka Razin, Kondraty Bulavin, Ivan Mazepa, and Yemelyan Pugachev, led major anti-imperial wars and revolutions in the Empire in order to abolish slavery and odious bureaucracy and to maintain independence. The Empire responded by ruthless executions and tortures, the destruction of the western part of the Don Cossack Host during the Bulavin Rebellion in 1707–1708, the destruction of Baturyn after Mazepa's rebellion in 1708, and the formal dissolution of the Lower Dnieper Zaporozhian Host in 1775, after Pugachev's Rebellion.