Polonized Ruthenian nobles) and the suppression of the Orthodox Church alienated the Cossacks. The latter did not shy from taking up arms against those they perceived as enemies and occupiers, including the Catholic Church with its local representatives. In 1648, Bohdan Khmelnytsky led the largest of the Cossack uprisings against the Commonwealth and the Polish king, which enjoyed wide support from the local population. Khmelnytsky founded the Cossack Hetmanate, which existed until 1764 (some sources claim until 1782). After Khmelnytsky suffered a crushing defeat at the Battle of Berestechko in 1651, he turned to the Russian tsar for help. In 1654, Khmelnytsky was subject to the Pereiaslav Agreement, forming a military and political alliance with Russia that acknowledged loyalty to the Russian monarch. After his death, the Hetmanate went through a devastating 30-year war amongst Russia, Poland, the Crimean Khanate, the Ottoman Empire, and Cossacks, known as "The Ruin" (1657-1686), for control of the Cossack Hetmanate. The Treaty of Perpetual Peace between Russia and Poland in 1686 divided the lands of the Cossack Hetmanate between them, reducing the portion over which Poland had claimed sovereignty to Ukraine west of the Dnieper river. In 1686, the Metropolitanate of Kyiv was annexed by the Moscow Patriarchate through a synodal letter of the Ecumenical Patriarch of Constantinople Dionysius IV, thus placing the Metropolitanate of Kyiv under the authority of Moscow. An attempt to reverse the decline was undertaken by Cossack Hetman Ivan Mazepa (1639–1709), who ultimately defected to the Swedes in the Great Northern War (1700-1721) in a bid to get rid of Russian dependence, but they were crushed in the Battle of Poltava (1709). The Hetmanate's autonomy was severely restricted since Poltava. In the years 1764–1781, Catherine the Great incorporated much of Central Ukraine into the Russian Empire, abolishing the Cossack Hetmanate and the Zaporozhian Sich, and was one of the people responsible for the suppression of the last major Cossack uprising, the Koliivshchyna. After the annexation of Crimea by Russia in 1783, the newly acquired lands, now called Novorossiya, were opened up to settlement by Russians. The tsarist autocracy established a policy of Russification, suppressing the use of the Ukrainian language and curtailing the Ukrainian national identity. The western part of present-day Ukraine was subsequently split between Russia and Habsburg-ruled Austria after the fall of the Polish–Lithuanian Commonwealth in 1795. 19th and early 20th century The 19th century saw the rise