Answer
Mustafa IV, the Ottoman Sultan, was overthrown in a palace coup led by the Janissaries, an elite military corps. Mahmud II, his cousin, was then installed as the new Sultan. This marked a significant turning point in Ottoman history, as Mahmud II embarked on a series of reforms aimed at modernizing the empire and strengthening its military and administrative systems.