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).
Secularism in Turkey
Sultan Selim III founded the first secular military schools by establishing the new military unit, Nizam-ı Cedid, as early as 1792. However the last century (19th century) of the Ottoman Empire had many far reaching reforms. These reforms peaked with the Tanzimat which was the initial reform era of the Ottoman Empire. After the Tanzimat, rules, such as those relating to the equalized status of non-Muslim citizens, the establishment of a parliament, the abandonment of medieval punishments for apostasy, as well as the codification of the constitution of the empire and the rights of Ottoman subjects were established. The First World War brought about the fall of the Ottoman Empire and the subsequent partitioning of the Ottoman Empire by the victorious Allies. Therefore, the Republic of Turkey was actually a nation-state built as a result of an empire lost.