Danzig rebellion The rebellion of the city of Danzig ( Gdańsk ) was a revolt in the mid 1570s of the city against the outcome of the Royal elections in Poland . The Polish throne was contested by Stephen Báthory and the Holy Roman Emperor Maximillian II . It began on 12 December 1575 when Emperor Maximillian was chosen as monarch by the Polish Senate , while the majority of the szlachta ( nobility ) had voted for Bathory . It ended on 16 December 1577 . Maximilian ' s II death in fall of 1576 weakened Danzig ' s position and made the conflict less about the recognition of the ruler than about Danzig ' s privileges . With neither side being able to defeat the other militarily , a compromise was reached , with economic as well as religious privileges of the city being restored and recognized , in return for a large reparation and recognition of Bathory as the king . Background . On 20 July 1570 , the Polish - Lithuanian king Sigismund II Augustus introduced Karnkowski Statutes , which partly reduced Danzig ' s special privileges granted by earlier Polish kings after the Prussian Confederation cities recognized their rule in 1454 . In 1572 , the throne of the Polish - Lithuanian Commonwealth was vacated when King Sigismund Augustus died without an heir and Henry III of France after a brief period as a Polish king returned to France . Polish - Lithuanian Commonwealth was an elective monarchy and ( after the Union of Lublin in 1569 ) in close union with Lithuania , meaning that Polish nobility ( szlachta ) could vote on who would become the next king . Cities had no vote ; Danzig however was invited by primate of Poland and interrex Jakub Uchański to cast a vote but declined to send a representative . Members of the Senate ( including most of the Polish episcopate led by Jakub Uchański ) decided to elect Emperor Maximilian II , against the will of majority of nobility , which during the royal election voted for Anna Jagiello ( the last representative of the former Polish - Lithuanian Jagiellon dynasty ) and Stephen Báthory as her husband and " de facto " King . This led to a some unrest in Poland . The town whose economic privileges were reduced by the Karnkowski Statutes , wanted to use the situation to regain its preferential position within the Polish Crown . It also preferred Maximilian , who looked more likely to support the towns ' economic privileges , and who could also threaten serious economic repercussions ( boycott by the Habsburgs ) . Thus the city , encouraged by its immense wealth and almost impregnable fortifications , as well as by the secret support of Denmark and Emperor Maximilian himself , had supported the latter ' s election . On 1 May 1576 Stefan Bathory married King Anna Jagiello and was crowned by Stanisław Karnkowski as King of Poland . Jakub Uchański and nuncio Wincenty Laureo recognized Maximillian as a King , but soon they and others accepted the will of majority . When Stefan swore in all of existing rights of Royal Prussia and Duchy of Prussia , and was recognized as a rightful ruler , Danzig refused to follow along and still recognized Maximillian as King of Poland . The tensions grew as rioters looted and burned down an abbey in Oliwa . The abbey belonged to the bishop of Kujawy , Stanisław Karnkowski , who had under his jurisdiction the whole of Polish Pomerania . The Sejm ( parliament ) of the Commonwealth did not approve higher taxes for the war . It did however approve a " banicja " ( form of political exile and excommunication ) , confiscation of the city ' s property , arrest of its citizens , commercial blockade and rerouting of the important trade via the port of Elbląg ( which however was immediately blockaded by Denmark ' s navy ) . Fighting . In August 1576 Bathory led 2 , 000 ( Polish soldiers and mercenaries from Transylvania and Wallachia ) men to Malbork ( Marienburg ) , from there Polish units took control the area surrounding Gdansk , capturing Grabina and Głowa , two strategically important villages , thereby blockading Daznig ' s port from the east and the south . The King left the army under the command of Hetman Jan Zborowski and most of the forces were stationed at Tczew ( Dirschau ) . In the west the main base was at Puck ( Putzig ) , where there was a mercenary force led by Ernest Weyher . While some Polish privateer ships fought the Gdansk and Danish fleets , for the most part the control of the Baltic Sea belonged to the Danzigers and their allies . Soon after the fighting begun , Maximilian ' s II death ( 12 October 1576 ) was announced ; this weakened Danzig ' s position and made the conflict less about the recognition of the ruler than about Danzig ' s privileges . With the coming of the spring of 1577 , the fighting began anew . The Danzig army , led by the German mercenary commander Johannn Winkelbruch ( Hans Winckelburg von Kölln ) , was about 7 , 000 - 12 , 000 strong ( including mercenaries , among them a Scottish regiment ) , but with less than 1 , 000 cavalry . Winckelburg decided to crush the small army of Zborowski ( who had about 2 , 000 men , half of them cavalry ) , but the Danzig army was utterly defeated by Zborowski in the battle of Lubiszewo on April 17 , 1577 . After the battle , the Danzig forces retreated behind the walls , citizens pulled down trees and houses in front of fortifications and a siege began . Reinforcement with King Batory arrived only in July . During it King Stefan was using heated cannonballs and turned back the flow of the Radunia river . Bathory had about 11 , 000 men , and Danzig , about 10 , 000 . A surprise attack by the Danzigers managed to destroy two - thirds of the Polish artillery , vastly slowing the progress of the siege . In September 1577 Danzig and Danish fleets started a blockade of Polish trade along Elbing and attacked its suburbs . Their troops that landed were soon pushed back by Bathory ' s Hungarian infantry under Kacper Bekiesza , and the city council send a note thanking the King . However , after a few months , Stephen ' s army was unable to take the city by force . On 16 December 1577 , the siege ended and citizens swore loyalty to Stefan ' s representatives Eustachy Wołłowicz and Andrzej Firlej . ( Treaty of Malbork ) . Aftermath . The Gdansk merchants had suffered a great deal from the blockade , especially because of lack of trade . In the meantime , Bathory also wanted to end the siege , as Ivan the Terrible of Muscovy broke a three year truce in the same year and Muscovy tried to gain control of the eastern territories of the Commonwealth ( Livonian War ) . The siege and all economic restrictions that were passed in the past two years were lifted in return for reparations and recognition of Bathory as the sovereign . Stefan forgave the city ' s rebellion and again turned Polish trade from Elbing to Danzig . The city , in turn , recognized him as ruler of Poland and promised to pay the large sum of 200 , 000 złoty s and an additional 20 , 000 repatriation to the abbey of Oliwa in five years . On 26 November 1585 the Karnkowski Statutes from 1570 were lifted , and Danzig again became the most privileged city in the Commonwealth .