In a short time his judicial and administrative reforms transformed those territories into model states. He succeeded his brother Alexander I as grand prince of Lithuania and king of Poland in 1506. Although he established fiscal and monetary reforms, he often clashed with the Polish Diet over extensions of royal power. At the Diet’s demand he married Barbara, daughter of Prince Stephen Zápolya of Hungary, in 1512, to secure a defense treaty and produce an heir. She died, however, three years later, leaving only daughters. In 1518 Sigismund married the niece of the Holy Roman emperor Maximilian, Bona Sforza of Milan, by whom he had one son, Sigismund II Augustus, and four daughters.