After the death of the last Piast on the Polish throne, Casimir III, Louis I of Hungary and his daughter Jadwiga of Poland began their rule. She married the Lithuanian prince Jogaila. Their marriage started a new dynasty in Poland: the Jagiellon dynasty. Under the Jagiellon dynasty, Poland made an alliance with its neighbor Lithuania.