Ottoman Hungary was the territory of Medieval Hungary which was ruled by the Ottoman Empire from 1541 to 1699. Ottoman rule covered mostly the central and southern territories of the former medieval Kingdom of Hungary as almost the entire region of the Great Hungarian Plain (except the northeastern parts) and Southern Transdanubia.
By the sixteenth century, the power of the Ottoman Empire had increased gradually, as did the territory controlled by them in the Balkans, while the Kingdom of Hungary was weakened by the peasants' uprisings. Under the reign of Louis II Jagiellon (1516–1526), internal dissentions divided the nobility.
Provoked into war by diplomatic insult, Suleyman the Magnificent (1520–1566) attacked the Kingdom of Hungary and captured Belgrade in 1521. He did not hesitate to launch an attack against the weakened kingdom, whose smaller, badly led army (approximately 26,000 Hungarian soldiers compared to 45,000 Ottoman soldiers) was defeated on 29 August 1526 at the Battle of Mohács. Thus he became influential in the Kingdom of Hungary, while his semi-vassal, named John I Zápolya and his enemy Ferdinand I both claimed the throne of the Kingdom. Suleyman went further and tried to crush Austrian forces, but his siege of Vienna in 1529 failed after the onset of winter forced his retreat. The title of king of Hungary was disputed between Zápolya and Ferdinand until 1540. After the seizure of Buda by the Ottomans in 1541, the West and North recognized a Habsburg as king ("Royal Hungary"), while the central and southern counties were annexed by the Ottoman Sultan and the east was ruled by the son of Zápolya under the name Eastern Hungarian Kingdom which after 1570 became the Principality of Transylvania. Whereas a great many of the 17,000 and 19,000 Ottoman soldiers in service in the Ottoman fortresses in the territory of present-day Hungary were Orthodox and Muslim Balkan Slavs, Southern Slavs were also acting as akıncıs and other light troops intended for pillaging in the territory of present-day Hungary.