Query: Which polish king led the fight against the Ottoman empire in the Battle of Vienna?
Context: This period of renewed assertiveness came to a calamitous end in May 1683 when Grand Vizier Kara Mustafa Pasha led a huge army to attempt a second Ottoman siege of Vienna in the Great Turkish War of 1683–1687. The final assault being fatally delayed, the Ottoman forces were swept away by allied Habsburg, German and Polish forces spearheaded by the Polish king Jan III Sobieski at the Battle of Vienna. The alliance of the Holy League pressed home the advantage of the defeat at Vienna, culminating in the Treaty of Karlowitz (26 January 1699), which ended the Great Turkish War.