Under a punitive postwar peace treaty signed in August 1920, the Allied powers stripped all Arab provinces from the Ottoman Empire, provided for an independent Armenia and an autonomous Kurdistan, put the Greeks in charge of a region surrounding Smyrna (now Izmir) and asserted economic control over what little country remained. However, Mustafa Kemal had already organized an independence movement based in Ankara, the goal of which was to end foreign occupation of the Turkish-speaking areas and to stop them from being partitioned. The sultan’s government in Istanbul sentenced Mustafa Kemal to death in absentia, but it failed to prevent him from building up both military and popular support. With the help of money and weapons from Soviet Russia, his troops crushed the Armenians in the east and forced the French and Italians to withdraw from the south. He then turned his attention to the Greeks, who had wreaked havoc on the Turkish population during their march to within 50 miles of Ankara.
In August and September 1921, with Mustafa Kemal at the head of the army, the Turks stopped the Greek advance at the Battle of Sakarya. The following August, they launched an offensive that broke the Greek lines and sent them into a full-scale retreat all the way back to Smyrna on the Mediterranean Sea. A fire soon broke out in Smyrna, which, along with looting and rampaging Turkish soldiers, claimed the lives of thousands of Greek and Armenian residents. Roughly 200,000 additional Greeks and Armenians were forced to evacuate on nearby Allied warships, never to return.
Mustafa Kemal next threatened to attack Istanbul, which was being occupied by the British and other Allied powers. Rather than fight, the British agreed to negotiate a new peace treaty and sent invitations to both the sultan’s government in Istanbul and Mustafa Kemal’s government in Ankara. But before the peace conference could begin, the Grand National Assembly in Ankara passed a resolution declaring that the sultan’s rule had already ended. Fearful for his life, the last Ottoman sultan fled his palace in a British ambulance. A new peace treaty was then signed in July 1923 that recognized an independent Turkish state. That October, the Grand National Assembly proclaimed the Republic of Turkey and elected Mustafa Kemal as its first president.