The conquest gave the Ottomans control over the holy cities of Mecca and Medina, previously controlled by the Mamluks. The Ottomans gradually came to be viewed as the leaders and representatives of the Muslim world and the Gunpowder empires. Following their defeat in World War I, their empire was partitioned by the United Kingdom and the French Third Republic. The Turkish Republic was proclaimed on 29 October 1923, and as part of the reforms of its first president, Mustafa Kemal Atatürk, the Grand National Assembly of Turkey constitutionally abolished the institution of the caliphate on 3 March 1924.