The War of the Polish Succession or the Hapsburg-Polish War took place from 1587 to 1588 over the election of monarch after the death of King of Poland and Grand Duke of LithuaniaStephen Báthory. The war was fought between factions of Sigismund III Vasa and Maximilian III, with Sigismund eventually being crowned King of Poland and Grand Duke of Lithuania. Two major battles of this conflict included the Siege of Kraków, in which Maximilian III failed to capture the capital of the Commonwealth, and the Battle of Byczyna, in which Maximilian was forced to surrender. Sigismund's victory was significantly the doing of Chancellor and HetmanJan Zamoyski, who stood behind both the political intrigue and the military victories of this conflict.