Decline and modernization of the Ottoman Empire
Beginning from the late eighteenth century, the Ottoman Empire faced challenges defending itself against foreign invasion and occupation. In response to foreign threats, the empire initiated a period of tremendous internal reform which came to be known as the Tanzimat, which succeeded in significantly strengthening the Ottoman central state, despite the empire's precarious international position. Over the course of the nineteenth century, the Ottoman state became increasingly powerful and rationalized, exercising a greater degree of influence over its population than in any previous era. The process of reform and modernization in the empire began with the declaration of the Nizam-ı Cedid (New Order) during the reign of Sultan Selim III and was punctuated by several reform decrees, such as the Hatt-ı Şerif of Gülhane in 1839 and the Hatt-ı Hümayun in 1856. At the end of this period, marked with 1908, to a degree the Ottoman military became modernized and professionalized according to the model of Western European Armies. The period was followed by the defeat and dissolution of the Ottoman Empire (1908–1922).
Kemalism
Many of the root ideas of Kemalism began during the late Ottoman Empire under various reforms to avoid the imminent collapse of the Empire, beginning chiefly in the early 19th-century Tanzimat reforms. The mid-century Young Ottomans attempted to create the ideology of Ottoman nationalism, or Ottomanism, to quell the rising ethnic nationalism in the Empire and introduce limited democracy for the first time while maintaining Islamist influences. In the early 20th century, Young Turks abandoned Ottoman nationalism in favor of early Turkish nationalism, while adopting a secular political outlook. After the demise of the Ottoman Empire, Atatürk, influenced by both the Young Ottomans and the Young Turks, as well as by their successes and failures, led the declaration of the Republic of Turkey in 1923, borrowing from the earlier movements' ideas of secularism and Turkish nationalism, while bringing about, for the first time, free education and other reforms that have been enshrined by later leaders into guidelines for governing Turkey.