In 1529, half of the city was destroyed by fire. Also during that year, Turkish armies laid siege to the city for 18 anxious days. They left Vienna's outer suburbs in smoldering ruins when they withdrew, but they never breached the inner walls. Partly as a gesture of solidarity, Ferdinand I declared Vienna the site of his official capital in 1533.
In the 16th century, the Protestant Reformation shook Europe. In the second half of the century, under the tolerant Maximilian II, Vienna was almost 80% Protestant and even had a Lutheran mayor. However, Ferdinand II was rigorous in his suppression of Protestantism, and returned Vienna to Catholicism. By the first half of the 17th century, Vienna was a bastion of the Counter-Reformation.
Incursions into the Balkans by Ottoman Turks continued to upset the balance of power in Central Europe. During the same period, there were outbreaks of the Black Death; in 1679, between 75,000 and 150,000 Viennese died. Leopold I commemorated the city's deliverance from the plague with the famous Pestaule column. It stands today on one of Vienna's main avenues, the Graben.
The final defeat of the Turks and the end of the Turkish menace came in September 1683. Along with a decline in plague-related deaths, the victory revitalized the city.