The decisive battle between the two candidates was won by Stephen Báthory at Sânpaul on July 8, 1575. In the same year, he was elected king of Poland, thus a personal union was formed between the two countries that lasted until his death in 1586. He left the administration of the principality first to his brother, Christopher Báthory (1575–1581), and then to his brother's minor son, Sigismund Báthory (1581–1602), bestowing on them the title of "voivode", while he himself took the title of prince.