Captain of Várad
Influenced by his Jesuit confessor, Alfonso Carillo, Sigismund Báthory decided to turn against the Ottoman Empire. His cousins sharply opposed his plan, which outraged Sigismund. He replaced Stephen Báthory with Bocskai, making the latter captain of Várad and ispán (or head) of Bihar County in May 1592. The captains of Várad were the commanders of the strongest army in the principality. Sigismund, who was a devout Catholic, ordered the Calvinist Bocskai to protect the Catholics in his new seat. Bocskai continued the reconstruction of the fortress, which protected the most important route between Transylvania and Royal Hungary.
The Ottoman Sultan, Murad III, ordered the Grand Vizier, Koca Sinan Pasha, to invade Royal Hungary in August 1593. In the same month, Ferenc Wathay (who was the cousin of Bocskai's wife) visited Bocskai in Várad. In his memoir, Wathay mentioned that his commander, Ferdinand Hardegg ("the king's representative"), had ordered him to meet Bocskai. Young Transylvanian noblemen hurried to Royal Hungary to fight against the Ottomans, but most Transylvanian politicians wanted to avoid war with the Ottoman Empire as long as Poland remained neutral. Sigismund did not abandon his plan to fight against the Ottomans, but only Bocskai and Ferenc Geszthy, who was the captain of Déva (now Deva in Romania), supported him in the royal council.
Crimean Tatars stormed into Hungary and pillaged the Partium in June 1594, forcing Bocskai to stay in Várad. Sigismund Báthory convoked the Diet, but the delegates of the Three Nations of Transylvania refused to declare war against the Ottoman Empire. Taking advantage of the prince's failure, Balthasar Báthory persuaded him to abdicate in late July. Sigismund went to Kővár (now Remetea Chioarului in Romania), and then announced that he wanted to move to Italy. Ferenc Kendi and Kovacsóczy prevented Balthasar from securing the princely throne for himself.
Bocskai and the other commanders of the army hurried to Kővár, where they and Friar Carillo convinced Sigismund to change his mind. Bocskai and his troops accompanied Sigismund back to Kolozsvár, forcing the delegates of the Three Nations to again pay homage to him on 27 August. A day later, fifteen leaders of the opposition were arrested at the prince's order. In a few days, many of them (including Balthasar Báthory and Farkas Kovacsóczy) were executed or murdered. Years later, Sigismund Báthory told Ferenc Nádasdy that Bocskai had forced him to order their execution. Most historians also say that Bocskai was responsible for the purge, which made him his nephew's most influential advisor.
Bocskai was made ispán of Inner Szolnok and Kraszna Counties. Many estates confiscated from the executed noblemen were granted to him during the following years, making him one of the wealthiest landowners of the principality. For instance, he seized the fortresses at Marosvécs in Transylvania proper (now Brâncovenești in Romania), and Szentjobb and Sólyomkő in Partium (now Sâniob and Șinteu in Romania).
Sigismund Báthory sent Bocskai as his plenipotentiary to Prague in November 1594 to start negotiations with the representatives of the anti-Ottoman Holy League. He signed a treaty regarding the membership of Transylvania in the League on 28 January 1595. The Holy Roman Emperor, Rudolph (who was also the king of Hungary), acknowledged the independence of Transylvania and promised his niece, Maria Christina, to Sigismund Báthory. Bocskai went to Graz, where he married Maria Christina as his nephew's proxy on 6 March. Upon his return to Transylvania, the Diet confirmed the treaty on 16 April. Bocskai accompanied Maria Christina from Kassa (now Košice in Slovakia) to Gyulafehérvár (present-day Alba Iulia in Romania) in July.
Sigismund Báthory made György Borbély Ban of Karánsebes (now Caransebeș in Romania), ordering him to invade the nearby Ottoman territories. Bocskai dispatched his deputy in Várad, György Király, to support Borbély's campaign. The Transylvanian army forced the Ottomans to abandon the fortresses along the Maros (Mureș) River before the end of October. However, Koca Sinan Pasha had meanwhile invaded Wallachia and captured Bucharest and Târgoviște. The Wallachian ruler, Michael the Brave, who had acknowledged Sigismund Báthory's suzerainty, was forced to retreat towards Transylvania. The grand vizier decided to transform Wallachia into an Ottoman province and made one of his commanders, Hasan Pasha, beylerbey (or governor) of Wallachia before he started to retreat in October.
To be able to provide military assistance to Michael of Wallachia, Sigismund Báthory promised the Székely commoners, who had earlier been reduced to serfdom, to restore their liberties if they joined his campaign on 15 September. More than 20,000 Székelys took up arms, enabling Sigismund to muster an army about 35,000 strong. Although the prince personally led the army to Wallachia, Bocskai was the actual commander of the campaign. After Michael the Brave and Sigismund's other vassal, Ștefan Răzvan of Moldavia, joined the campaign, their united troops laid siege to Târgoviște on 16 October. Two days later, Bocskai personally led the decisive attack against the fortress, forcing the Ottoman soldiers to abandon it and try to break through the besiegers. The Ottomans were either killed or captured. The Ottoman garrison abandoned Bucharest without resistance and the main Ottoman army retreated to Giurgiu on the Danube. By the time Sigismund's army reached the Danube, most Ottoman soldiers had crossed the river, but those who had stayed behind in Wallachia were massacred on 29 October. On the following day, the Ottoman fortress at Giurgiu was also occupied. After returning to Transylvania, Sigismund Báthory revoked his decision about the liberation of the Székelys on 12 December.
In January 1596 Sigismund Báthory left for Prague to start negotiations over the continuation of the war against the Ottomans. He charged Bocskai with the administration of Transylvania. Bocskai soon had to face the Székely commoners. Their leaders threatened those who accepted serfdom with impalement. Bocskai sent troops to Székely Land, ordering the punishment of the ringleaders. His lieutenants overrode his instructions and put down the rebellion with extreme cruelty during the "Bloody Carnival" of 1596.
Sigismund Báthory returned from Prague in March 1596. He personally led his troops against the Crimean Tatars and Ottomans who had broken into the Partium. During his absence, Bocskai administered the principality. After a series of Ottoman victories, Sigismund started negotiations regarding his abdication with the representatives of Rudolph. The agreement was signed in December 1597, but Rudolph did not send his representatives to take possession of Transylvania for months. During the transition period, the Catholic Chancellor of Transylvania, István Jósika, accused Bocskai of initiating a plot to seize Transylvania for himself, but Friar Carillo stood by Bocskai. Bocskai persuaded Sigismund Báthory to have Jósika imprisoned shortly before his official abdication. The prince also awarded him the title of baron on 29 March 1598.