The origins of the first Cossacks are disputed, though the 1710 Constitution of Pylyp Orlyk claimed Khazar origin.[nb 2] The emergence of Cossacks is dated to the 14th or 15th centuries, when two connected groups emerged, the Zaporozhian Sich of the Dnieper and the Don Cossack Host.[nb 3]
The Zaporizhian Sich were a vassal people of Poland–Lithuania during feudal times. Under increasing pressure from the Polish–Lithuanian 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 (1654) brought most of the 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 (Ural) 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, democracy, 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 serfdom and odious bureaucracy and to maintain independence. The empire responded with ruthless executions and tortures, the destruction of the western part of the Don Cossack Host during the Bulavin Rebellion in 1707–08, the destruction of Baturyn after Mazepa's rebellion in 1708,[nb 4] and the formal dissolution of the Lower Dnieper Zaporozhian Host in 1775, after Pugachev's Rebellion.[nb 5]
By the end of the 18th century Cossack nations had been transformed into a special military estate (Sosloviye), "a military class".[nb 6] Similar to the knights of medieval Europe in feudal times or the tribal Roman auxiliaries, the Cossacks came to military service having to obtain charger horses, arms and supplies at their own expense. The government provided only firearms and supplies for them.[nb 7] Cossack service was considered the most rigorous one.
Because of their military tradition, Cossack forces played an important role in Russia's wars of the 18th–20th centuries, such as the Great Northern War, the Seven Years' War, the Crimean War, Napoleonic Wars, the Caucasus War, numerous Russo-Persian Wars, numerous Russo-Turkish Wars and the First World War. In the late 19th and early 20th centuries, the Tsarist regime used Cossacks extensively to perform police service.[nb 8] They also served as border guards on national and internal ethnic borders (as was the case in the Caucasus War).
During the Russian Civil War, Don and Kuban Cossacks were the first nations to declare open war against the Bolsheviks. By 1918 Cossacks declared the complete independence of their nations and formed the independent states, the Ukrainian State, the Don Republic and the Kuban People's Republic. Cossack troops formed the effective core of the anti-Bolshevik White Army, and Cossack republics became centers for the anti-Bolshevik White movement. With the victory of the Red Army, the Cossack lands were subjected to Decossackization and Holodomor. After the dissolution of the Soviet Union, the Cossacks made a systematic return to Russia. Many took an active part in post-Soviet conflicts. In Russia's 2010 Population Census, some people reported their ethnicity as Cossacks. There are Cossack organizations in Russia, Kazakhstan, Ukraine, Belarus and the United States.