Battle of Vienna
Events during the siege

The main Ottoman army laid siege to Vienna on 14 July. On the same day, Kara Mustafa sent the traditional demand that the city surrender to the Ottoman Empire. Ernst Rüdiger Graf von Starhemberg, leader of the remaining 15,000 troops and 8,700 volunteers with 370 cannons, refused to capitulate. Only days before, he had received news of the mass slaughter at Perchtoldsdorf, a town south of Vienna, where the citizens had handed over the keys of the city after having been given a similar choice but were killed anyway. Siege operations started on 17 July.

The Viennese had demolished many of the houses around the city walls and cleared the debris, leaving an empty plain that would expose the Ottomans to defensive fire if they tried to rush into the city. In response to this Kara Mustafa Pasha would order his forces to dig long lines of trenches directly toward the city, to help protect them from the defenders as they advanced.

The Ottomans had 130 field guns and 19 medium-caliber cannon, compared to the defenders' 370. Mining tunnels were dug under the city walls, which would then be filled with sufficient quantities of black powder to demolish the walls. According to Andrew Wheatcroft, the outer palisade was around 150 years old and mostly rotten. To counter this, the defenders set to work knocking very large tree trunks into the ground to surround the walls. This disrupted the Ottoman plan of a quick siege, adding almost another three weeks to the time it would take to get past the old palisade. This, combined with the delay in advancing their army after declaring war, eventually allowed a relief force to arrive in September. Some historians have speculated that Kara Mustafa wanted to take the city intact with its riches and declined an all-out attack, not wishing to initiate the plundering that would accompany an assault, which was viewed as the right of conquering soldiers.

The Ottoman siege cut virtually all means of food supply into Vienna. Fatigue became so common that von Starhemberg ordered any soldier found asleep on watch to be shot. Increasingly desperate, the forces holding Vienna were on the verge of defeat when, in August, Imperial forces under Charles V, Duke of Lorraine, defeated Thököly at Bisamberg, 5 km (3.1 mi) northwest of Vienna.

On 6 September, the Poles under Sobieski crossed the Danube 30 km (19 mi) northwest of Vienna at Tulln, to unite with imperial troops and the additional forces from Saxony, Bavaria, Baden and other imperial estates. The forces were also joined by several mercenary regiments of Zaporozhian Cossacks hired by the Polish–Lithuanian Commonwealth. Louis XIV of France declined to help his Habsburg rival, having just annexed Alsace.

An alliance between Sobieski and Emperor Leopold I resulted in the addition of the Polish hussars to the existing allied army. The command of the European allied forces was assigned to the Polish king, renowned for his extensive experience in leading campaigns against the Ottoman army. Notably, he achieved a decisive victory over the Ottoman forces in the Battle of Khotyn (1673) and now commanded an army of 70,000–80,000 soldiers, countering a supposed Ottoman force of 150,000. Sobieski's courage and aptitude for command were already known in Europe.

During early September, approximately 5,000 experienced Ottoman sappers had repeatedly demolished large portions of the walls between the Burg bastion, the Löbel bastion and the Burg ravelin, creating gaps of about 12 metres (39 ft) in width. In response to this, the Viennese began digging their own tunnels to intercept the placing of large amounts of gunpowder in the caverns. The Ottomans finally managed to occupy the Burg ravelin and the low wall nearby on 8 September. Anticipating a breach in the city walls, the remaining Viennese prepared to fight in the inner city.
combination:two_responses, change_case:capital_word_frequency[4]