Transylvanian estates elected Báthory Voivode of Transylvania. Bekes, supported by the Habsburgs, disputed his election, but by 1573, Báthory emerged victorious in the resulting civil war and drove Bekes out of Transylvania. He subsequently attempted to play the Ottomans and the Holy Roman Empire against one another in an attempt to strengthen the Transylvania position. Elected king In 1572, the throne of the Polish–Lithuanian Commonwealth, at the time the largest and one of the most populous states in Europe, was vacated when King Sigismund II Augustus died without heirs. The Sejm was given the power to elect a new king, and in the 1573 Polish–Lithuanian royal election chose Henry of France; Henry soon ascended the French throne and forfeited the Polish one by returning to France. Báthory decided to enter into the election; in the meantime he had to defeat another attempt by Bekes to challenge his authority in Transylvania, which he did by defeating Bekes at the Battle of Kerelőszentpál. On 12 December 1575, after an interregnum of roughly one and a half years, primate of Poland Jakub Uchański, representing a pro-Habsburg faction, declared Emperor Maximilian II as the new monarch. However, chancellor Jan Zamoyski and other opponents of Habsburgs persuaded many of the lesser nobility to demand a "Piast king", a Polish king. After a heated discussion, it was decided that Anna Jagiellon, sister of the former King Sigismund II Augustus, should be elected king and marry Stephen Báthory. In January 1576 Báthory passed the mantle of voivode of Transylvania to his brother Christopher Báthory and departed for Poland. On 1 May 1576 Báthory married Anna and was crowned king of Poland and grand duke of Lithuania. After being chosen as king in the 1576 Polish–Lithuanian royal election, Báthory also began using the title of the prince of Transylvania. Establishing power Báthory's position was at first extremely difficult, as there was still some opposition to his election. Emperor Maximilian, insisting on his earlier election, fostered internal opposition and prepared to enforce his claim by military action. At first the representatives of the Grand Duchy of Lithuania refused to recognize Báthory as grand duke, and demanded concessions - that he return the estates of his wife Anne to the Lithuanian treasury, hold Sejm conventions in both Lithuania and Poland, and reserve the highest governmental official offices in Lithuania for Lithuanians. He accepted the conditions. In June Báthory was recognized