The Ottoman Empire was defeated by the Allied powers in World War I and the empire was divided by several major powers. Many territories of the Ottoman Empire including those in Anatolia were to be given to Britain, France, Italy, Greece and Armenia. While the Ottoman Empire was collapsing after the war, Atatürk quickly fled the capital Istanbul right before the Allied occupation of the city and went to Ankara where he organized a Turkish resistance army to fight against the invaders and kick them out of Anatolia. After defeating the armies which had invaded Anatolia and expelling them in September 1922, he marched into Istanbul as a liberator in January 1923 where he created a nationalist Turkish movement that created the new, secular Republic of Turkey. This meant that the country's government was no longer led by hereditary or religious leaders. Visitors to Turkey are often surprised by the importance given to Atatürk in Turkey.