In 1504 century, the Głogów line of the Silesian Piasts died out with the death of Jan II the Mad. Jan's cruel measures had provoked the resistance of the Głogów citizens, and in 1488 the troops of King Matthias Corvinus appeared at the city gates and expelled the duke. In 1491–1506 Głogów was ruled by John Albert and Sigmund the Old, future kings of Poland.