After the Battle of Mohacs in 1526 and the first siege of Vienna 1529, Hungary was partitioned in three parts : Ottoman Hungary (the central plain, with Buda, Pest and Szekesfehervar), Royal Hungary in the west (with core Croatia and much of Slovakia) and Transylvania in the east.
In the 1540's and 1550's the reformation made great progress in Hungary, to an extent that much of the country's clergy and populace professed protestantism; only remnants of the Catholic church remained, most of the ranks of the Hungarian Catholic church hierarchy were deserted.
Among the protestants, there were three interpretations competing - the Lutherans with strongholds in the German speaking communities of Royal Hungary and in German communities in Transylvania, the Calvinists dominating in the lands east of the Danube, and the ANTITRINITARIANS. The Calvinists turned out to be the strongest group, organized in dioceses under superintendents. GASPAR KAROLYI published the Hungarian bible translation in 1590. A feature characteristic to Hungarian Calvinism is that the church continued to be administrated by bishops (superintendents); councils of elders, according to the Genevan model, emerged only in the 17th century.
The Habsburg dynasty professed Catholicism and introduced the Counterreformation to Royal Hungary. Yet given the volatile politic situation of Hungary, the inquisition had to act with restraint in order not to cause a revolt. Thus progress of recatholization was slow; at the end of the century, about 90 % of the Hungarians were protestants. The TREATY OF VIENNA 1606 granted religious freedom to Hungary's Lutherans and Calvinists; yet in the first decades of the 17th century, the Counterreformation made progress, causing BETHLEN GABOR in Transylvania to take up arms (1619); protestants and catholics soon came to an agreement when a Turkish force appeared. The diet of 1620 elected Bethlen Gabor King and dissolved most of Hungary's dioceses. Yet, in the cause of the 30 years War, the Habsburg side held the upper hand, and the Counterreformation made considerable progress at the expense of the protestants. In the TREATY OF LINZ (1645, complete religious freedom, even for serfs, was implemented for Hungary. The diet of 1646 allocated 90 out of 400 churches claimed by the protestants to them, indicating a great shift in the religious balance. Hungary's protestants continued to be dissatisfied, and from time to time protestants participated in conspiracies or rebellions against Habsburg rule, such as in 1678-1684, at a time when Vienna faced the second Turkish siege.