The Republic of Turkey was founded in 1923 by Mustafa Kemal Ataturk, replacing the dynastic and theocratic Ottoman system with its Sultanates and Caliphates. The new republic was based on a secular democratic, pluralist, and parliamentary system. In 1945 Turkey joined the UN and became a member of NATO in 1952.