In 1572, the Jagiellon dynasty died out, and next year, Henry III of France became first elected king of the country. After his short reign, and War of the Polish Succession (1587–88), which also took place in Lesser Poland, the new ruler was Stephen Báthory of Poland, who died in 1586. The ruler from Transylvania was followed by Sigismund III Vasa of Sweden, whose election marked gradual decline of the province. Sigismund's eyes were set on Sweden, and for many years he concentrated his efforts on a futile attempt to regain his former Swedish throne (see Polish–Swedish union, War against Sigismund). Therefore, Lesser Poland, located in southwestern corner of the Commonwealth, began to lose its importance, which was marked in 1596, when Sigismund moved his permanent residence, court and the crown headquarters to centrally-located Warsaw.