The Turkish army pursued the retreating enemy forces and entered İzmir on September 9, 1922. On October 11, 1922, the Armistice of Mudanya was signed, and the Allied forces withdrew from the Turkish territories they had occupied.
After the War of Independence, on October 29, 1923, the Republic of Türkiye was declared, and Atatürk was elected its first President.
He was re-elected four times and served as the longest-serving president until his death in 1938.