Before Russian rule
Nomadic tribes calling themselves Kazakhs first appeared on the steppes of present-day Kazakhstan during the 15th century. According to their own folk tradition, the Kazakhs descend from a legendary founding father called Alash.
Over the centuries, missionaries from the Muslim civilization of Transoxiana brought Islam to the steppe nomads. By the time the Kazakhs took shape as an ethnic group, they were nominally Muslim, though still under the influence of their old animistic beliefs, centered on the cult of the sky god Tengri.
Kazakh tribes were ruled by Khans
A loose network of tribal leaders called khans, nobles or sultans, who claimed descent from Genghis Khan, ruled the Kazakh tribes. In the 16th century the tribes split up into the three Juz each led by its own khans. Each Juz moved within a distinct geographical zone—the Senior Juz in the southeast, the Junior Juz in the northwest, and between the two, the Middle Juz.
In the mid-17th century, a nomadic Mongol people from the east called Jungars began raiding Kazakh lands. In the early 18th century, the Jungars occupied much of the Syr Darya basin. Divided among themselves, the Kazakh khans failed to repel the invasion, and appealed to Russia for protection. Although Chinese armies defeated the Jungars in the 1750s, bringing southeastern Kazakh lands for a few years under the Chinese empire, the Kazakhs were exposed to increasing Russian pressure. In the first half of the 19th century, Russia annexed the Kazakhs' lands and did away with their khans.