In 1587 Sigismund stood for election to the Polish throne after the death of Stephen Báthory. His candidacy was secured by Queen Dowager Anna, Hetman Jan Zamoyski and several elite magnates who considered him a native candidate as a descendant of the Jagiellons, though the election was openly questioned and opposed by the nobles politically associated with the Zborowski family. With the blessing of primate Stanisław Karnkowski and strong support from other people of influence he was duly elected ruler of the Polish–Lithuanian Commonwealth on 19 August 1587. His official name and title became "by the grace of God, king of Poland, grand duke of Lithuania, ruler of Ruthenia, Prussia, Masovia, Samogitia, Livonia and also hereditary king of the Swedes, Goths and Wends"; the latter titles being a reference to the fact that he was already the Crown Prince of Sweden, and thus would lawfully succeed to the throne of Sweden upon the death of his father.