In the mid-14th century, upon the death of Bolesław Jerzy II of Mazovia, king Casimir III of Poland initiated campaigns (1340–1366) to take Galicia-Volhynia. Meanwhile, the heartland of Rus', including Kyiv, became the territory of the Grand Duchy of Lithuania, ruled by Gediminas and his successors, after the Battle on the Irpen' River. Following the 1386 Union of Krewo, a dynastic union between Poland and Lithuania, much of what became northern Ukraine was ruled by the increasingly Slavicised local Lithuanian nobles as part of the Grand Duchy of Lithuania. By 1392 the so-called Galicia–Volhynia Wars ended. Polish colonisers of depopulated lands in northern and central Ukraine founded or re-founded many towns.