Government of the late Ottoman Empire
Starting in the 19th century the Ottoman Empire's governing structure slowly transitioned and standardized itself into a Western style system of government, sometimes known as the Imperial Government. Mahmud II initiated this process following the disbandment and massacre of the Janissary corps, at this point a conservative bureaucratic elite, in the Auspicious Incident. A long period of reform known as the Tanzimat period started, which yielded much needed reform to the government and social contract with the multicultural citizens of the empire.
In the height of the Tanzimat period in 1876, Abdul Hamid II turned the Empire into a constitutional monarchy by promulgating the Empire's first Constitution, which established the short First Constitutional Era and also featured elections for a parliament. Defeat in the 1877–1878 War with Russia and dissatisfaction with Abdul Hamid lead to the "temporary" suspension of the constitution and the parliament, resulting in a modern despotism/autocracy of Abdul Hamid, during which internal reform continued. The Young Turk Revolution in 1908 started the longer lasting Second Constitutional Era and forced Abdul Hamid to reinstate the constitution, recall the parliament, and hold elections again which this time which featured political parties. However, by 1913 the Ottoman Empire was a dictatorship of the Committee of Union and Progress (CUP), led by the Three Pashas (Talat Pasha, Enver Pasha, and Cemal Pasha). This dictatorship capitalized on the developed bureaucracy created through a century of reform and centralization by undertaking genocide against Christian minorities. The CUP also undertook many reforms relating to social structure, religion, and education, which would be continued and more far reaching under Mustafa Kemal Atatürk's regime. The Union and Progress dictatorship lasted until the end of World War I, which lead to the Empire's collapse and subsequent abolition by Turkish nationalist forces led by Atatürk.
During this time period the various Viziers' responsibilities became equivalent to European style ministries, while the Grand Vizier received de jure equivalent powers to Prime ministers. In 1864, provincial reform was undertaken by standardizing administrative divisions into vilayets, with a governor assigned to each vilayet. Law was codified during the Late Ottoman Empire, with various systems given legitimacy: including Sharia, secular law, Code Napoleon, and various other laws derived from the millets.