It is said that Jadwiga was betrothed to William of Habsburg. Her father Louis I had made an arrangement with Sigismund for Sigismund to marry either Jadwiga or Jadwiga's sister Mary of Hungary. Sigismund married Mary and Jadwiga wound up marrying the duke of Lithuania Jagiello, because Louis wanted her to have a husband, when she took over the reign of Poland. Louis died in 1382. When Jadwiga died in 1399 Jagiello became the sole ruler of Poland and Lithuania as Wladislaw II Jagiello.