[2] Both parties agreed to install fourteen-year-old Yuri II Boleslav, a Masovian prince and nephew of Lev and Andrew.
Yuri Boleslav, born Bolesław, was the son of Trojden I of Masovia from the Polish Piast dynasty, a cousin of Władysław I and nephew of Gediminas' son-in-law Wenceslaus of Płock.
Within days of Yuri Boleslav's murder, Casimir III of Poland invaded the kingdom to save Polish merchants and Catholic residents from attacks in Lviv.
[3] During the winter of 1340–1341, the Golden Horde (probably with Lithuanian help) attacked Poland and reached Lublin as a result of diminished tribute from the principality of Galicia to the Mongol khan.
In order to assist Casimir, a Hungarian contingent commanded by William Drugeth entered the Ruthenian border and fought against the Mongols.
The same year direct conflict between Poland and Lithuania renewed, but soon a peace treaty was signed: Volhynia was assigned to Liubartas and Galicia to Casimir.
Casimir responded by organizing a large campaign against the pagan Lithuanians with a special permission from Pope Innocent VI.
In 1376 the war resumed: Liubartas, Kęstutis, and Yuri of Belz attacked Sandomierz and Tarnów, reaching as far as Kraków and taking many prisoners.
After Louis death in 1382, Liubartas captured castles ruled by Hungarians (including Kremenets and Przemyśl),[9] but did not renew a full-scale war.
[12] However, that did not appease Vytautas, who sought to regain his patrimony in Trakai and gain power in the Grand Duchy of Lithuania, and he started the Lithuanian Civil War (1389–92).
The civil war ended with the Ostrów Agreement of 1392, which settled Galician–Volhynian issue for good: Poland took Galicia adopting title Dei gratia rex Polonie et Russie, nec non Cracovie, Sandomirie, Siradie, Lancicie, Cuiavie, et Pomeranieque Terrarum et Ducatuum Dominus et Heres, while Lithuania controlled Volhynia.