In ancient times, the area of modern Kazakhstan was inhabited by Turkic nomads. The Kazakhs did not emerge as a distinct people until the 15th century, when the Kazakh khanate was formed. During the 18th century the Kazakhs turned to Russia for protection against hostile neighboring tribes. By the 19th century, Russia had gained control over the region.

During 1917–19 Kazakh nationalists established an independent government in Kazakhstan. In 1920 Kazakhstan was incorporated back into Russia as an autonomous republic. During the 1930's, famine caused nearly a million deaths. Kazakhstan became a union republic of the Soviet Union in 1936.

Rising nationalism throughout the union republics during 1990–91 gradually eroded the authority of the Soviet central government. In December, 1991, Nursultan Nazarbayev became the first popularly elected president of Kazakhstan. Later that month, after the Soviet Union collapsed, Kazakhstan became Independent. Also in 1991, Kazakhstan joined the Commonwealth of Independent States. In 1993 Kazakhstan signed an international nuclear nonproliferation treaty and agreed to dismantle or remove all nuclear weapons from the country.