Kazakhstan, officially the Republic of Kazakhstan, is a transcontinental landlocked country located mainly in Central Asia and partly in Eastern Europe. It borders Russia to the north and west, China to the east, Kyrgyzstan to the southeast, Uzbekistan to the south, and Turkmenistan to the southwest, with a coastline along the Caspian Sea. Its capital is Astana, known as Nur-Sultan from 2019 to 2022. Almaty, Kazakhstan's largest city, was the country's capital until 1997. Kazakhstan is the world's ninth-largest country by land area and the world's largest landlocked country. It has a population of 19 million people and one of the lowest population densities in the world, at fewer than . Ethnic Kazakhs constitute a majority of the population, while ethnic Russians form a significant minority. Officially secular, Kazakhstan is a Muslim-majority country, although ethnic Russians in the country form a sizeable Christian community.
The territory of Kazakhstan has historically been inhabited by nomadic groups and empires. In antiquity, the ancient Iranic nomadic Scythians inhabited the land, and the Achaemenid Persian Empire expanded towards the southern territory of the modern country. Turkic nomads, who trace their ancestry to many Turkic states such as the First Turkic Khaganate and the Second Turkic Khaganate, have inhabited the country from as early as the 6th century. In the 13th century, the territory was subjugated by the Mongol Empire under Genghis Khan. In the 15th century, as a result of disintegration of the Golden Horde, the Kazakh Khanate was established on much of the lands that would later form the territory of modern Kazakhstan.
By the 18th century, Kazakh Khanate disintegrated into three jüz which were absorbed and conquered by the Russian Empire; by the mid-19th century, the Russians nominally ruled all of Kazakhstan as part of the Russian Empire and liberated all of the slaves that the Kazakhs had captured in 1859. Following the 1917 Russian Revolution and subsequent outbreak of the Russian Civil War, the territory of Kazakhstan was reorganized several times.