Russian advancement into the territory of Kazakhstan began in the late 18th century, when the Kazakhs nominally accepted Russian rule in exchange for protection against repeated attacks by the western Mongolian Kalmyks. In the 1890s, Russian peasants began to settle the fertile lands of northern Kazakhstan, causing many Kazakhs to move eastwards into Chinese territory in search of new grazing grounds. The 1906 completion of the Trans-Aral Railway between Orenburg and Tashkent further facilitated Russian colonization. The first collectivized farms opened in Kazakhstan in 1921, populated primarily by Russians and Soviet deportees. In 1930, as part of the first Five Year Plan, the Kazakh Central Committee decreed the sedentarization of nomads and their incorporation into collectivized farms. This movement resulted in devastating famine, claiming the lives of an estimated 40% of ethnic Kazakhs (1.5 million), between 1930 and 1933. Hundreds of thousands also fled to China, Iran and Afghanistan. The famine rendered Kazakhs a minority within Kazakhstan, and only after the republic gained independence in 1991 did Kazakhs recover a slim demographic majority within Kazakhstan.