As the last surviving male in the Ottoman line it was vital that Mahmut produce an heir. 

Mahmut was almost twenty-three when he became sultan.  He had spent nineteen years in the Cage although he had had far more freedom than the caged prices of earlier times.  His first official act as sultan was to appoint Bayraktar Mustafa Pasha as Grand Vizier, and Bayraktar carried on the reforms begun under Selim III and abandoned whilst Mustafa was on the throne.  Unfortunately the Janissaries again rebelled at the prospect of their organisation being reformed and in November 1808 Bayraktar was killed when they attacked his headquarters.  The rebels marched on Topkapi demanding the reinstatement of Mustafa, but Mahmut had his brother executed, and his death ended the revolt as Mahmut also gave up on his reforms.

As the last surviving male in the Ottoman line it was vital that Mahmut produce an heir.  His eighteen recorded concubines eventually bore him a total of nineteen boys and seventeen girls, of whom only two sons, Abdül Mecit and Abdül Aziz, together with four daughters survived to adulthood – both boys later became sultans.

Mahmut’s reign saw the first serious cracks in the Ottoman Empire with Greece gaining its independence following a rebellion that started in 1821 and was consolidated with the victory of the combined British-French-Russian fleets against the Ottoman navy at the battle of Navarino in 1827. The Ottoman Empire was forced to recognise Greece with the Treaty of Constantinople in 1832. This event, together with the occupation of the Ottoman province of Algeria by France in 1830, marks the beginning of the gradual break-up of the Ottoman Empire.

One of Mahmut’s most notable achievements was the abolition of the Janissaries in 1826 which he replaced with a modern Ottoman army.  He also subjugated the Iraqi Mamluks in 1831 and planned the Tanzimat reforms which began to be introduced from 1839.  The Tanzimat marks the beginning of modernisation in Turkey, and had immediate effects on social and legal aspects of life in the Empire, such as European style clothing, architecture, legislation, institutional organisation and land reform.

Mahmut died from tuberculosis in 1839 and was succeeded by his son Abdül Mecit.