Jadwiga was crowned "king" in Poland's capital, Kraków, on 16 October 1384. Her coronation either reflected the Polish nobility's opposition to her intended husband, William, becoming king without further negotiation, or simply emphasized her status as queen regnant. With her mother's consent, Jadwiga's advisors opened negotiations with Jogaila, Grand Duke of Lithuania, who was still a pagan, concerning his potential marriage to Jadwiga. Jogaila signed the Union of Krewo, pledging to convert to Catholicism and to promote his pagan subjects' conversion. Meanwhile, William hastened to Kraków, hoping to marry his childhood fiancée Jadwiga, but in late August 1385 the Polish nobles expelled him. Jogaila, who took the baptismal name Władysław, married Jadwiga on 15 February 1386. Legend says that she had agreed to marrying him only after lengthy prayer, seeking divine inspiration.