Answer
Mustafa IV was the half-brother of Mahmud II, with both being Ottoman sultans. Mustafa IV succeeded Selim III as sultan after Selim III was deposed by the Janissaries. However, his rule lasted only a year as the Janissaries once again revolted and removed him, replacing him with Mahmud II, who ruled for 31 years.