Born in Constantinople, Mustafa IV was the child of Sultan Abdülhamid I (1774–1789) and Nükhetsezâ Hanımefendi. They alone were therefore eligible to inherit the throne from Selim, by whom they were treated favorably. Mustafa"s brief reign was turbulent.
Immediately upon ascending to the throne, the Janissaries rioted throughout Constantinople, looting and murdering anyone who appeared to support Selim.
More threatening, however, was a truce signed with the Russians, which freed Mustafa Bayrakdar, a pro-reformist commander stationed on the Danube to march his army back to Constantinople in an effort to restore Selim. With the aid of the Grand Vizier of Adrianople, the army marched on the capital and seized the palace.
He then ordered his guards to show the rebels Selim"s body, and they promptly tossed it into the inner courtyard of the palace. Mustafa then ascended his throne, assuming that Mahmud was also dead, but the prince had been hiding in the furnace of a bath.
Just as the rebels demanded that Mustafa "yield his place to a worthier," Mahmud revealed himself, and Mustafa was deposed.
The failure of his short reign prevented the efforts to undo the reforms, which continued under Mahmud. Mustafa was later killed on Mahmud"s orders.