The ayan of Rustchuk, Alemdar Mustafa, a strong partisan of the reforms, collected an army of 40,000 men and marched on Constantinople with the purpose of reinstating Selim III, but he came too late. The ill-fated reforming Sultan had been stabbed in the seraglio by the Chief Black Eunuch and his men. Upon his arrival in the capital, Bairakdar's only resource was to wreak his vengeance on Mustafa IV and to place on the throne Mahmud II (1808–1839), the sole surviving member of the house of Osman.