By the 16th century, the Kazakh emerged as a distinct group, divided into three jüz (ancestor branches occupying specific territories). The Russians began advancing into the Kazakh steppe in the 18th century, and by the mid-19th century, they nominally ruled all of Kazakhstan as part of the Russian Empire. Following the 1917 Russian Revolution, and subsequent civil war, the territory of Kazakhstan was reorganised several times.