Mahmud II (Ottoman Turkish: محمود ثاني Mahmud-ı sānī) (July 20, 1785 – July 1, 1839) was the 30th Sultan of the Ottoman Empire. He ruled from 1808 until his death. Mahmud was the son of Sultan Abdül Hamid I. His time as sultan is notable mostly for the major legal and military changes he caused.