On October 30, 1918, the armistice of Mudros marked the defeat and the end of the participation of the Ottoman Empire in WWI. In the aftermath, the victorious Allied Powers started occupying the Ottoman territories on November 12, 1918.
The Allies wanted to dissolve the Ottoman Empire. As a result, the Treaty of Sèvres was signed on August 10, 1920, which sought to abolish the Ottoman Empire and partition its territories. As the treaty imposed severe terms, it was not accepted by the Turkish Nationalists.
While the Treaty of Sèvres was still under discussion, the Turkish national movement under Mustafa Kemal Pasha set up a Turkish Grand National Assembly in Ankara in April 1920 and split it from the Ottoman Government of Istanbul.
Meanwhile, the Greeks had already begun a military operation in Anatolia to pressure the Ottoman Empire into accepting the Treaty of Sèvres. But Turkish victory led by Mustafa Kemal in the Turkish War of Independence compelled Greece to sign the Armistice of Mudanya on October 11, 1922. The agreement ended the war between Turkey, Greece, and the Allied Powers. According to the terms, the Greeks were to leave Eastern Thrace.
Following the Mudanya Agreement, the peace process once again began with the Allies’ invitation to the governments in both Istanbul and Ankara to send representatives to a peace conference. But the Grand National Assembly of Ankara responded by dissolving the Ottoman Sultanate on November 1, 1922.
The Turkish National Assembly then selected all the Turkish representatives for the conference, thereby solving the representation problem. The Lausanne Peace Conference officially started on November 20.
The Treaty of Lausanne was signed on July 24, 1923, and led to the end of the occupation of Istanbul. The last troops of the Allies departed from the city on October 04, 1923.
Turkey also had to give up its former Arab provinces and recognize British possession of Cyprus and Italian possession of the Dodecanese. The treaty led to the international recognition of the sovereignty of the new Republic of Turkey. The Republic of Turkey was declared on October 29, 1923, with Mustafa Kemal Ataturk serving as its first president.