In 1911, Italy and France entered into fierce competition over Libya. Since Italy was fearful of France attacking the Ottoman Empire first and seizing Libya, the Italians attacked first. They defeated the Ottomans and, through a peace treaty, obtained the Dodacanese Islands and Libya from the Ottomans. The states of Greece, Serbia, Bulgaria, and Montenegro took advantage of this situation and attacked the Ottomans in the hope of acquiring all the Ottoman provinces in the north of Greece, Thrace, and the southern European coast of the Black Sea.
They easily defeated the Ottomans and made them retreat back, almost to the very edge of Europe. The 2nd Balkan War erupted just two years later when Greece, Serbia, and Montenegro disapproved of the extent of territories which Bulgaria had annexed. Joined by the Ottomans, these three powers managed to roll back Bulgarian territorial gains. This was the last military victory in the history of Ottoman and which indirectly also paved the way to the First World War.
As a result of this conflict and also by virtue of the Treaty of Versailles in 1919, the Ottomans lost all their territory in Syria, Palestine, Arabia, and Mesopotamia. The European powers fought against each other in Africa and the Middle East by encouraging revolution among the peoples there.
The year 1922 officially put the last knell to the coffin of the Ottoman rule as Turkey was declared a republic. Apart from the external sufferings which Ottomans had to undergo from Europe, internally they also faced revolution by liberal nationalists who wished to adopt Western style governments. The object of the revolution was to modernize and westernize Turkey.
Auturk in his capacity as the President of Turkey from 1922 to 1928 introduced a series of legislative reforms which adopted European legal systems and civil codes thereby overthrowing both the 'Shariah' as well as the 'kanun.' He legislated against the Arabic script and converted Turkish writing to the European Roman script.
Additionally, he also legislated against the Arabic call to prayer and eliminated the caliphate and all the mystical Sufi orders of Islam. It is for these reasons that Ataturk is considered as one of the most significant political figures in Islam. He was the first to theorize and put into practice the secularization of the Islamic state and society. However, despite of Ataturks reforms, the Turkish republic still remained an independent and secular Islamic state.
Thus, the history of the Ottoman Empire in the 19th century was one of increasing internal weakness and deterioration in the machinery of Government and of sustained external pressure by the Great Powers, which ultimately resulted in the complete dissolution of that Empire.