Ottoman armies reached Vienna twice, in 1529 and again in 1683, and were turned back both times, the second after a relief force led by the king of Poland broke the siege lines. Both events were immediately given religious meaning. A papal legate had preached the campaign, a feast in honour of the name of Mary was instituted in thanksgiving, and for centuries afterwards European writing treated the city as the point where Christendom held. Ottoman accounts read the same events in their own frame, as the limit of a campaign season rather than of a civilisation.
The Habsburg capital made its Catholicism a matter of dynastic identity. Emperors were buried in the Capuchin crypt with their hearts placed separately in an Augustinian church nearby, processions bound the court to the calendar, and Protestantism was pushed out of Austria almost entirely during the Counter-Reformation.
That changed from above. Joseph II dissolved contemplative monasteries whose members did not teach or nurse, reorganised parishes, and in 1781 issued a Patent of Toleration allowing Lutherans, Calvinists and Orthodox to worship privately, with a separate edict extending rights to Jews. The Congress that met in Vienna in 1815 to settle Europe after Napoleon redrew confessional boundaries wholesale, restored the papal states, and left several German rulers governing populations of a different confession from their own.