In 1516 Louis II., Vladislas’s son became the king. In the year 1521 a Turkish army conquered Belgrade, which opened the way to Hungary. Young king Louis decided to confront the Turkish danger, but the war against the Turks ended in disastrous slaughter in the battle of Mohács on 29th of August 1526. Young king Louis was killed in the battle, the defeat of Hungarians had far-reaching consequences for the whole historical development in Central Europe. Turks conquered the greater part of the country and the long-term Turkish occupation of the Hungarian State has started. At the same time, it was the beginning of the creation of the Habsburg Empire in Central Europe.

According to the contract concluded between Vladislas and Maximilian Habsburg, Ferdinand von Habsburg became the Hungarian king, but he had to share his power with the Duke Ján Zapoľský. Also, Turks involved the dispute. The result was splitting the Hungary into three parts. The Royal Hungary was reduced to Slovakia, part of Croatia and a narrow strip of land lying just to the east of the Austrian border. The Habsburgs, a new dynasty, sat upon the Hungarian throne and incorporated Hungary into their multi-national central European Empire. Slovakia (excluding the eastern part) has become an essential part of the Habsburg Hungary. Along its southern region a defensive line and the border between the Christian and Islamic worlds was drawn.

The significance of Slovakia increased during this period. In 1536 Bratislava became the capital city of Hungary. It was the seat of the central administrative offices; there sat the parliament until 1848, and for three centuries the kings of Hungary were crowned there. The seat of the Archbishop of Esztergom, which was occupied by the Turks, was transferred to Trnava. In 1635 a Jesuit university opened in this city. Once again Košice became a center for the administration of the eastern part of Hungary and there the ruler also founded a university in 1657.

16th and 17th centuries were the bloodiest centuries in the whole history of Slovakia. Many areas of Slovakia were literally devastated. There was constant threat of the Turkish invasion, because the Slovak ethnic group was in the close vicinity of the Turks. The proximity of the Turks effected a retardation of the economy. War, cross-boarder raids, pillage, fires, taking captives as hostages or as slaves became the customary way of life in the region for 150 years. The cities maintained substantial garrisons of troops. The poorly paid Habsburg mercenaries, among them perhaps members of almost all European people, sometimes caused greater damage than the Turkish enemy or the noble rebels did. Life in Hungary during the sixteenth and seventeenth century was complicated by long-term conflicts and struggles for power.

One of the reasons for the defeat of Hungary by the Turks was the reluctance of the nobility (Hungarian aristocracy) to give up a portion of their privileges and to respect the central authority. The Habsburgs, who joined under one scepter Bohemia, the Austrian territory and Hungary, sought to legitimize their authority by citing the need to defend central Europe from the expansion of the Turks. Their policy was often directed towards limiting the privileges of the Hungarian nobility and the independence of the Hungarian state and, at the same time, towards the strengthening of the central Habsburg power. The dissatisfaction of the Hungarian nobility often developed into open opposition and a refusal of allegiance to the Habsburgs. The whole of the seventeenth century was marked by uprisings against the Habsburgs. Their leaders Bocskay (1604-1606), Bethlen (1619-1629), George I. Rákóczi (1643-1645), George II. Rákóczi (1648-1660), Thököly (1678-1687) often were aided by the Turks.

In addition to the defense of noble privileges and the resistance to the absolutism these uprisings were caused also by deep religious controversies. The Reformation penetrated Slovakia already during the first half of the 1520 s. Because it also legitimized the secularization of church property, it attracted a greater proportion of the nobility. In Slovakia, the Lutheran movement was most wide-spread while Calvinism spread mostly among the Hungarians. By the end of the sixteenth century an independent Lutheran church was established. In the following century, however, the recatholization movement was so intense that, by the beginning of the twentieth century, only sixteen percent of the Slovak population were Lutherans.

In 1618, when the anti-Habsburg uprising erupted in Prague, Hungarian nobles rose up too. In 1678 young aristocrat Imrich Thököly organized malcontents. In a very short time he managed to occupy the whole of Eastern and Central Slovakia. Turkish sultan promised the crown of Hungary to Thököly if he conforms to him. Thököly stroked in. In the war in 1683, Turks were defeated, first in Vienna and then in Hungary.

The bloodiest settlement with insurgents happened in Prešov, the main actor was General Antonio Caraffa. Twenty-four rebels were executed. They cut off their hands first, then the heads and after, they put their body parts on the hooks and hung them around the roads to castle as a warning.

After their defeat at Vienna 1683, the Turkish army was pushed out of Hungary.

Map of Hungary in 1683:
Map of Hungary in 1683

The 18th century is called as the enlightened century. In 1711, also the last and biggest uprising of Ferencz II. Rákóczy was defeated. The country offered a very sad picture, but in peaceful conditions it was able to recover with remarkable speed. The population growth in Slovakia was so high that Slovaks migrated to the depopulated south of Hungary. The Slovak Diaspora and communities have been preserved up to the present day in northern and southern Hungary, Serbia and Romania.

New Emperor Charles VI. wanted to prevent the power struggle for the crown, so in 1713 he issued the pragmatic sanction. It allowed that also female descendent could succeed to the throne if the dynasty dies off in male tail. Pragmatic sanction opened a path to the throne for the daughter of Charles VI. – Maria Theresa.

In the year 1740 Maria Theresa became an empress. With an assistance of advisers she has launched a reform of the entire country with a view to centralize the state, but also to modernize and bring it forward to western European monarchies. Many of the reforms were according to enlightenment ideas that were disseminated in Europe from France. Top of her reform efforts was a scheme for the organization in education, known as the Education Ratio (in 1777).

After Maria Theresa’s death, her son Joseph II. took over the throne. He was a well-informed and educated man, who on the instruction of his mother studied in the spirit of the enlightenment. His most important reforms were the patent of Tolerance in 1781 and the abolition of serfdom in the year 1785. Tolerance patent alleged civil equality for all members of the Christian faith.

The reforms of Maria Theresa (1740-1780) and those of her son, Joseph II. (1780-1790), in the spirit of the Enlightenment, formed the basis of a modern state administration, tax and transportation system, army and schools. Thanks to them, the obligations of the serfs decreased and serfdom was ultimately abolished. The Habsburg court supported the establishment of manufacturing and reformed primary and secondary education. In 1763 Maria Theresa established in Banská Štiavnica the college for training mining, foundry and forestry specialists, the Mining and Forestry Academy. In 1781, the Edict of Toleration of Joseph II. increased the rights of Protestants and actually ended the era of the Counter-Reformation in Hungary.