en.wikipedia.org/wiki/Piast_dynasty The Piast dynasty was the first historical ruling dynasty of Poland. The first documented Polish monarch was Duke Mieszko I (c. 930–992). The Piasts' royal rule in Poland ended in 1370 with the death of king Casimir III the Great.
Branches of the Piast dynasty continued to rule in the Duchy of Masovia and in the Duchies of Silesia until the last male Silesian Piast died in 1675. The Piasts intermarried with several noble lines of Europe, and possessed numerous titles, some within the Holy Roman Empire. The Jagiellonian kings after John I Albert were also descended in the female line from Casimir III's daughter.