During the first half of the sixteenth century, Hungarian society underwent two dramatic changes. Firstly, Suleiman the Magnificent’s Ottoman armies advanced into the northern Balkans, causing the collapse of the Hungarian kingdom after the battle at Mohács in August 1526. Hungary subsequently became divided into three parts, with the Ottomans controlling the central and southern counties, the Habsburgs governing Royal Hungary from the Croatian coast to the mountains of Upper Hungary, and a series of native nobles elected to rule over the Transylvanian principality, which included the counties of the eastern Hungarian plain. Secondly, the spread of Protestant ideas about religious reform brought confessional division to Hungary. The initial reform was to a large degree driven by a desire to purify the Catholic Church, whose spiritual credentials were badly discredited by the Ottoman invasion. By 1570 German- and Hungarian-speaking towns and most Hungarian magnates and nobles had abandoned the Catholic Church. German-speakers and nobles in western Hungarian counties on the whole adopted Lutheranism. Calvinism meanwhile came to dominate religious life in the eastern counties, and also received broad support within Transylvania, although some Hungarian towns and Szeklers in Transylvania instead embraced anti-Trinitarianism. Confessional loyalty across Hungary was decided by a variety of factors including patterns of communication and trading networks, the pre-Reformation structures of ecclesiastical organization, and feudal, regional, and family ties. Linguistic barriers were also crucial in determining adherence to a particular religion, with Lutheranism widely supported by German-speakers whilst Calvinism was almost exclusively the preserve of Magyar-speakers. It seems clear that some sense of linguistic or ethnic community assisted both Protestant Churches to reinforce attachment to their confessions.