On August 26, 1922, the Turkish Army launched a counter-offensive to liberate the homeland from foreign occupation.
This victory led to Atatürk being awarded the rank of Marshal and the title "Gazi" (Veteran) by the Grand National Assembly.
On August 30, 1922, in the Battle of Dumlupınar, the Turkish forces, commanded by Atatürk, decisively destroyed the majority of the Greek army.
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.