Czechoslovakia was created after World War I and the collapse of the Austro-Hungarian Empire. Shortly before World War II, Czechoslovakia ceased to exist, swallowed by Nazi expansion. Its territory was divided into the mainly Czech Protectorate of Bohemia and Moravia, and the newly declared Slovak Republic, while a considerable part of Czechoslovakia was directly joined to the Third Reich (Hungary and Poland also annexed areas). Catholicism had had a strong institutional presence in the region under the Habsburg Dynasty, but Bohemian Czechs in particular had a troubled relationship with the Church of their rulers. Despite this, According to Schnitker, "the Church managed to gain a deep-seated appreciation for the role it played in resisting the common Nazi enemy."