Classical Age of the Ottoman Empire
Expansion continued during the first half of the reign of Suleiman I (r. 1520-1566), who conquered first Belgrade (1521) and Rhodes, before invading Hungary in 1526, defeating and killing King Louis II in the Battle of Mohács and briefly occupying Buda. Lacking a king, Hungary descended into civil war over the succession, and the Ottomans gave support to John Zápolya as a vassal prince. When their rivals the Habsburgs began to achieve the upper hand, Suleiman directly intervened by again conquering Buda and annexing it to the empire in 1541. Elsewhere, Suleiman led major campaigns against Safavid Iran, conquering Baghdad in 1534 and annexing Iraq. Ottoman rule was further extended with the incorporation of much of North Africa, the conquest of coastal Yemen in 1538, and the subsequent annexation of the interior.
Muhammad Ali dynasty
At the height of his power, Muhammad Ali and his son Ibrahim Pasha's military strength did indeed threaten the very existence of the Ottoman Empire as he sought to supplant the Osman Dynasty with his own. Ultimately, the intervention of the Great Powers prevented Egyptian forces from marching on Constantinople, and henceforth, his dynasty's rule would be limited to Africa, and Sinai. Muhammad Ali had conquered Sudan in the first half of his reign and Egyptian control would be consolidated and expanded under his successors, most notably Ibrahim Pasha's son Isma'il I.