In a strict sense, the Union of Krewo or "Act of Krėva" (also spelled "Union of Krevo", "Act of Kreva"; Lithuanian: Krėvos sutartis) was a set of prenuptial promises made in the Kreva Castle on 14 August 1385 by Jogaila, Grand Duke of Lithuania, in exchange for marriage to the underage reigning Queen Jadwiga of Poland. The act was very limited in scope and in the historiography the term "Union of Krewo" often refers not only to the particular document but to the events of 1385–1386 as a whole. After the negotiations in 1385, Jogaila converted to Christianity, married Jadwiga, and was crowned King of Poland in 1386. The union was a decisive moment in the histories of Poland and Lithuania; it marked a beginning of the four centuries of shared history between the two nations. By 1569 the Polish–Lithuanian union grew into a new state, the Polish–Lithuanian Commonwealth, and lasted until the Third Partition in 1795.
Louis I of Hungary died on 13 September 1382. Since he had only two surviving daughters, Mary (born ca. 1371) and Jadwiga (born ca. 1373), Poland faced a succession crisis. Candidates for the throne included Mary's fiancé Sigismund of Luxembourg, Siemowit IV, Duke of Masovia, and Władysław Opolczyk. Mary and her fiancé were rejected by the Polish nobles, who did not wish to continue a personal union with the Kingdom of Hungary. Polish nobles competed with each other and a brief civil war broke out in Greater Poland. Eventually, after long negotiations with Jadwiga's mother Elizabeth of Bosnia, who was regent of Hungary, Jadwiga arrived in Kraków and was crowned as King of Poland (not as Queen of Poland, to emphasize her rights to the throne) on 15 October 1384. The new monarch still needed a suitable husband. She was betrothed to William of Austria, who in summer 1385 traveled to Poland in an attempt to consummate the proposed marriage and present a fait accompli. He succeeded in reaching Wawel, but was forcibly removed by Polish nobles. It is unclear whether he succeeded in consummating the marriage, but biased Austrian sources continued to accuse Jadwiga of bigamy. Nobles from Lesser Poland, including Spytek of Melsztyn, Jan of Tarnów, and Jan Tęczyński, proposed that Jadwiga marry Jogaila, Grand Duke of Lithuania.