Bocskai was elected prince of Transylvania on 21 February 1605 and prince of Hungary on 20 April of that year. His realm included most of Transylvania proper, Partium and Upper Hungary. Stephen Báthory died on 25 July 1605. He had willed most of his estates to Gabriel, who became one of the wealthiest noblemen in Bocskai's realm. Bocskai hinted that he regarded Gabriel as his successor, ordering Bálint Drugeth (commander-in-chief of his army in Upper Hungary) to "hold Gabriel Báthory in the highest esteem among the Hungarian lords" if he did not return from his meeting with Ottoman Grand Vizier Lala Mehmed Pasha in November 1605. Young noblemen (including Gabriel's future enemy, Gabriel Bethlen) and military officials also supported Gabriel. Years later, Gáspár Bojti Veres wrote that Gabriel hosted feasts to win popularity with Bocskai's courtiers and commanders. Gabriel's relatives, Mihály Káthay (Bocskai's chancellor) and János Imreffy (Kata Iffjú's husband), were his principal supporters. His position weakened after Bocskai who was taken ill suddenly had Káthay imprisoned for treason in early September 1606. Káthay's opponents, Simon Péchi and János Rimay, persuaded the dying (and often unconscious) Bocskai to name Bálint Drugeth his successor in his last will.