After the Mongol invasion of Kievan Rus' the histories of the Russian and Ukrainian people's started to diverge. The former, having successfully united all the remnants of the Rus' northern provinces, swelled into a powerful Russian state. The latter came under the domination of the Grand Duchy of Lithuania, followed by the Polish–Lithuanian Commonwealth. Within the Commonwealth, the militant Zaporozhian Cossacks refused polonization, and often clashed with the Commonwealth government, controlled by the Polish nobility. Unrest among the Cossacks caused them to rebel against the Commonwealth and seek union with Russia, with which they shared much of the culture, language and religion, which was eventually formalized through the Treaty of Pereyaslav in 1654. From the mid-17th century Ukraine was gradually absorbed into the Russian Empire, which was completed in the late 18th century with the Partitions of Poland. Soon afterward in the late 18th century the Cossack host was forcibly disbanded by the Empire, with most of the population relocated to the Kuban region in the South edge of the Russian Empire, where the Cossacks would serve a valuable role for the Empire in subjugating the fierce Caucasian tribes.