The area was resettled in 1370 during the reign of the Grand Duchy of Lithuania, and after a military conflict, it was ceded to Muscovite Russia in 1503. The Polish–Lithuanian Commonwealth reclaimed the area in 1618, and in 1634 built a fortress and established the city of Boplana in the area. Karpo Skydan raised a peasant rebellion against the Polish nobles in 1637, and by 1648 the area was taken by the Cossacks in their rebellion for self-rule. It transferred again to Polish rule after the Battle of Berestechko in 1651 as part of the Treaty of Bila Tserkva. This was shortly reversed in the aftermath of the Treaty of Pereyaslav, when Russia grew to encompass its eventual empire.