information:highlighting, structural:summarization, structural:expansion
Succession and death

At the dying request of the childless Jadwiga he married a Styrian lady, Anna of Celje. She died in 1416, leaving a daughter :

In 1417, Władysław married Elisabeth of Pilica, who died in 1420 without bearing him a child. Two years later, he married Sophia of Halshany (niece of Uliana Olshanska), who bore him two surviving sons :

The death in 1431 of his daughter Hedwig (Jadwiga), the last heir of Piast blood, released Władysław to make his sons by Sophia of Halshany his heirs, though he had to placate the Polish nobility with concessions to ensure their agreement, since the monarchy was elective. In 1427 the Polish nobles had initiated an anti-Jagiellonian movement, seeking to have Władysław and Casimir excluded from the Polish throne as they had no blood link to the previous ruling Polish dynasty, the Piasts.

During an excursion into Przemyśl Land in the 48th year of his reign, Władysław caught a cold from which he was unable to recover. He finally died in Grodek in 1434, leaving Poland to his elder son, Władysław III, and Lithuania to his younger, Casimir, both still minors at the time. The Lithuanian inheritance, however, could not be taken for granted. Władysław's death ended the personal union between the two realms, and it was not clear what would take its place.