Since about March the Turks were preparing for an attack on the Hapsburg capital, Vienna, and were gathering their forces together rather rapidly. By June, they had invaded Austria, and King Leopold and his court fled to Passau. On July 14, the Turks reached Vienna. They laid siege to the great city. One of the disadvantages that the Turks had was that they did not have sufficient heavy artillery. The defenders fought bravely but their food supply and their ammunition were growing low. The Turks had made some breaches in the walls but their effort was hindered by the barricades erected by the people of Vienna. Earlier that year on March 31, 1683, King John III had signed the Treaty of Warsaw with the Holy Roman Emperor Leopold. In this treaty, it was agreed to come to one's aid if the Turks attacked either Krakow or Vienna. Following his agreement in the treaty and the appeal of the pope, Sobieski marched to Vienna with an army of about 30,000 men. Sobieski said that his purpose for going to Vienna was "to proceed to the Holy War, and with God's help to give back the old freedom to besieged Vienna, and thereby help wavering Christendom." Upon reaching Vienna, he joined up with the Austrians and Germans. Sobieski planned to attack on the 13th of September, but he had noticed that the Turkish resistance was weak. When he ordered full attack, he completely surprised Kara Mustafa. Sobieski and his husaria, which is Polish heavy cavalry, alongside with the cooperation of all army, played an important role in the victory. Sobieski with his husaria charged toward Kara Mustafa's headquarters and seeing this, Mustafa's army fled in panic. Even so, the Turkish army suffered heavy losses. This victory freed Europe from the Ottoman Turks and their invasions and secured Christianity as the main religion in all of Europe. After the Battle Jan Sobieski entered Vienna in glory. The King and his Polish army had won lots of fame after their victory. Jan III Sobieski was not only looked upon as the savior of Vienna, but as a savior of the whole Europe from the Ottoman Turks.